diff --git a/Gemfile b/Gemfile index 4c818e2..1c6639b 100644 --- a/Gemfile +++ b/Gemfile @@ -1,71 +1,86 @@ source 'https://rubygems.org' -gem 'rails', '3.2.9' - -# Bundle edge Rails instead: -# gem 'rails', :git => 'git://github.com/rails/rails.git' - -gem "mysql2" - - -# Gems used only for assets and not required -# in production environments by default. -group :assets do - gem 'sass-rails', '~> 3.2.3' - gem 'coffee-rails', '~> 3.2.1' - - # See https://github.com/sstephenson/execjs#readme for more supported runtimes - # gem 'therubyracer', :platforms => :ruby - - gem 'uglifier', '>= 1.0.3' +# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' +gem 'rails', '4.0.0' +gem 'bcrypt-ruby', '~> 3.0.0' +# Use sqlite3 as the database for Active Record + +gem 'mysql2' + gem 'sass-rails' gem 'compass-rails' gem 'zurb-foundation', ">= 3.2" -end +# Use Uglifier as compressor for JavaScript assets +gem 'uglifier', '>= 1.3.0' +# Use CoffeeScript for .js.coffee assets and views +gem 'coffee-rails', '~> 4.0.0' + +# See https://github.com/sstephenson/execjs#readme for more supported runtimes +# gem 'therubyracer', platforms: :ruby + +# Use jquery as the JavaScript library gem 'jquery-rails' gem 'jquery-ui-rails' -gem "raptor-editor-rails" -# To use ActiveModel has_secure_password +# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks +gem 'turbolinks' + +# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder +gem 'jbuilder', '~> 1.0.1' + +gem "therubyracer" +gem "less-rails" +gem "twitter-bootstrap-rails" + +gem 'haml-rails' + +gem 'nokogiri' +gem 'acts_as_tree' +gem 'formtastic', :git => 'git://github.com/justinfrench/formtastic.git' + + +gem 'kaminari-bootstrap' + + +gem "htmlentities" + + +group :doc do + # bundle exec rake doc:rails generates the API under doc/api. + gem 'sdoc', require: false +end + +gem "capistrano", group: :development +gem "rvm-capistrano", group: :development + +# Use ActiveModel has_secure_password # gem 'bcrypt-ruby', '~> 3.0.0' -# To use Jbuilder templates for JSON -# gem 'jbuilder' - # Use unicorn as the app server -# gem 'unicorn' +gem 'unicorn' -# Deploy with Capistrano -# gem 'capistrano' +gem "nokogiri" -# To use debugger -# gem 'debugger' -gem 'capistrano' -gem 'rvm-capistrano' -gem 'gravatar_image_tag' +gem 'kaminari-bootstrap' -gem 'formtastic' -gem 'haml' +gem 'acts_as_commentable' -gem 'acts_as_tree' -gem "pg" gem "devise" gem "cancan" gem 'kaminari' -gem 'carrierwave' gem 'rmagick' +gem 'carrierwave', "0.9.0" + gem "geocoder" #markdown gem 'pygments.rb' gem 'redcarpet' -gem 'nokogiri' -gem "therubyracer" -gem "less-rails" #Sprockets (what Rails 3.1 uses for its asset pipeline) supports LESS -gem "twitter-bootstrap-rails" +# Use debugger +# gem 'debugger', group: [:development, :test] diff --git a/Gemfile.lock b/Gemfile.lock index 50e4edd..c31f95d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,222 +1,242 @@ +GIT + remote: git://github.com/justinfrench/formtastic.git + revision: f630fb0bee233c75301cc0a362cfbe58ae7b5001 + specs: + formtastic (2.3.0.rc2) + actionpack (>= 3.0) + GEM remote: https://rubygems.org/ specs: - actionmailer (3.2.9) - actionpack (= 3.2.9) - mail (~> 2.4.4) - actionpack (3.2.9) - activemodel (= 3.2.9) - activesupport (= 3.2.9) - builder (~> 3.0.0) + actionmailer (4.0.0) + actionpack (= 4.0.0) + mail (~> 2.5.3) + actionpack (4.0.0) + activesupport (= 4.0.0) + builder (~> 3.1.0) erubis (~> 2.7.0) - journey (~> 1.0.4) - rack (~> 1.4.0) - rack-cache (~> 1.2) - rack-test (~> 0.6.1) - sprockets (~> 2.2.1) - activemodel (3.2.9) - activesupport (= 3.2.9) - builder (~> 3.0.0) - activerecord (3.2.9) - activemodel (= 3.2.9) - activesupport (= 3.2.9) - arel (~> 3.0.2) - tzinfo (~> 0.3.29) - activeresource (3.2.9) - activemodel (= 3.2.9) - activesupport (= 3.2.9) - activesupport (3.2.9) - i18n (~> 0.6) - multi_json (~> 1.0) - acts_as_tree (1.2.0) + rack (~> 1.5.2) + rack-test (~> 0.6.2) + activemodel (4.0.0) + activesupport (= 4.0.0) + builder (~> 3.1.0) + activerecord (4.0.0) + activemodel (= 4.0.0) + activerecord-deprecated_finders (~> 1.0.2) + activesupport (= 4.0.0) + arel (~> 4.0.0) + activerecord-deprecated_finders (1.0.3) + activesupport (4.0.0) + i18n (~> 0.6, >= 0.6.4) + minitest (~> 4.2) + multi_json (~> 1.3) + thread_safe (~> 0.1) + tzinfo (~> 0.3.37) + acts_as_commentable (4.0.1) + acts_as_tree (1.5.1) activerecord (>= 3.0.0) - arel (3.0.2) + arel (4.0.2) + bcrypt (3.1.7) bcrypt-ruby (3.0.1) - builder (3.0.4) - cancan (1.6.8) - capistrano (2.13.5) + builder (3.1.4) + cancan (1.6.10) + capistrano (2.15.5) highline net-scp (>= 1.0.0) net-sftp (>= 2.0.0) net-ssh (>= 2.0.14) net-ssh-gateway (>= 1.1.0) - carrierwave (0.7.1) + carrierwave (0.9.0) activemodel (>= 3.2.0) activesupport (>= 3.2.0) - chunky_png (1.2.7) - coffee-rails (3.2.2) + json (>= 1.7) + chunky_png (1.3.0) + coffee-rails (4.0.1) coffee-script (>= 2.2.0) - railties (~> 3.2.0) + railties (>= 4.0.0, < 5.0) coffee-script (2.2.0) coffee-script-source execjs - coffee-script-source (1.4.0) - commonjs (0.2.6) - compass (0.12.2) + coffee-script-source (1.7.0) + commonjs (0.2.7) + compass (0.12.5) chunky_png (~> 1.2) fssm (>= 0.2.7) - sass (~> 3.1) - compass-rails (1.0.3) - compass (>= 0.12.2, < 0.14) - devise (2.1.2) - bcrypt-ruby (~> 3.0) + sass (~> 3.2.19) + compass-rails (1.1.6) + compass (>= 0.12.2) + devise (3.2.4) + bcrypt (~> 3.0) orm_adapter (~> 0.1) - railties (~> 3.1) - warden (~> 1.2.1) + railties (>= 3.2.6, < 5) + thread_safe (~> 0.1) + warden (~> 1.2.3) erubis (2.7.0) - execjs (1.4.0) - multi_json (~> 1.0) - formtastic (2.2.1) - actionpack (>= 3.0) - fssm (0.2.9) - geocoder (1.1.6) - gravatar_image_tag (1.1.3) - haml (3.1.7) - highline (1.6.15) - hike (1.2.1) - i18n (0.6.1) - journey (1.0.4) - jquery-rails (2.1.4) + execjs (2.0.2) + fssm (0.2.10) + geocoder (1.1.9) + haml (4.0.5) + tilt + haml-rails (0.5.1) + actionpack (~> 4.0.0) + activesupport (~> 4.0.0) + haml (>= 3.1, < 5.0) + railties (~> 4.0.0) + highline (1.6.21) + hike (1.2.3) + htmlentities (4.3.1) + i18n (0.6.9) + jbuilder (1.0.2) + activesupport (>= 3.0.0) + jquery-rails (3.1.0) railties (>= 3.0, < 5.0) thor (>= 0.14, < 2.0) - jquery-ui-rails (4.0.1) - jquery-rails - railties (>= 3.1.0) - json (1.7.6) - kaminari (0.14.1) + jquery-ui-rails (4.2.0) + railties (>= 3.2.16) + json (1.8.1) + kaminari (0.15.1) actionpack (>= 3.0.0) activesupport (>= 3.0.0) - less (2.3.2) - commonjs (~> 0.2.6) - less-rails (2.3.3) + kaminari-bootstrap (3.0.1) + kaminari (>= 0.13.0) + rails + kgio (2.9.2) + less (2.5.0) + commonjs (~> 0.2.7) + less-rails (2.5.0) actionpack (>= 3.1) - less (~> 2.3.1) - libv8 (3.11.8.17) - mail (2.4.4) - i18n (>= 0.4.0) + less (~> 2.5.0) + libv8 (3.16.14.3) + mail (2.5.4) mime-types (~> 1.16) treetop (~> 1.4.8) - mime-types (1.19) - modular-scale (1.0.2) - compass (>= 0.11.5) - sassy-math (>= 1.2) - multi_json (1.5.0) - mysql2 (0.3.11) - net-scp (1.0.4) - net-ssh (>= 1.99.1) - net-sftp (2.0.5) - net-ssh (>= 2.0.9) - net-ssh (2.6.2) - net-ssh-gateway (1.1.0) - net-ssh (>= 1.99.1) - nokogiri (1.5.6) - orm_adapter (0.4.0) - pg (0.14.1) - polyglot (0.3.3) - posix-spawn (0.3.6) - pygments.rb (0.3.7) + mime-types (1.25.1) + mini_portile (0.5.3) + minitest (4.7.5) + multi_json (1.9.2) + mysql2 (0.3.15) + net-scp (1.1.2) + net-ssh (>= 2.6.5) + net-sftp (2.1.2) + net-ssh (>= 2.6.5) + net-ssh (2.8.0) + net-ssh-gateway (1.2.0) + net-ssh (>= 2.6.5) + nokogiri (1.6.1) + mini_portile (~> 0.5.0) + orm_adapter (0.5.0) + polyglot (0.3.4) + posix-spawn (0.3.8) + pygments.rb (0.5.4) posix-spawn (~> 0.3.6) yajl-ruby (~> 1.1.0) - rack (1.4.5) - rack-cache (1.2) - rack (>= 0.4) - rack-ssl (1.3.2) - rack + rack (1.5.2) rack-test (0.6.2) rack (>= 1.0) - rails (3.2.9) - actionmailer (= 3.2.9) - actionpack (= 3.2.9) - activerecord (= 3.2.9) - activeresource (= 3.2.9) - activesupport (= 3.2.9) - bundler (~> 1.0) - railties (= 3.2.9) - railties (3.2.9) - actionpack (= 3.2.9) - activesupport (= 3.2.9) - rack-ssl (~> 1.3.2) + rails (4.0.0) + actionmailer (= 4.0.0) + actionpack (= 4.0.0) + activerecord (= 4.0.0) + activesupport (= 4.0.0) + bundler (>= 1.3.0, < 2.0) + railties (= 4.0.0) + sprockets-rails (~> 2.0.0) + railties (4.0.0) + actionpack (= 4.0.0) + activesupport (= 4.0.0) rake (>= 0.8.7) - rdoc (~> 3.4) - thor (>= 0.14.6, < 2.0) - rake (10.0.3) - raptor-editor-rails (0.2.1) - rails (> 3.1) - rdoc (3.12) + thor (>= 0.18.1, < 2.0) + raindrops (0.13.0) + rake (10.2.2) + rdoc (4.1.1) json (~> 1.4) - redcarpet (2.2.2) + redcarpet (3.1.1) ref (1.0.5) - rmagick (2.13.1) - rvm-capistrano (1.2.7) - capistrano (>= 2.0.0) - sass (3.2.5) - sass-rails (3.2.5) - railties (~> 3.2.0) + rmagick (2.13.2) + rvm-capistrano (1.5.1) + capistrano (~> 2.15.4) + sass (3.2.19) + sass-rails (4.0.1) + railties (>= 4.0.0, < 5.0) sass (>= 3.1.10) - tilt (~> 1.3) - sassy-math (1.2) - compass (~> 0.11) - sprockets (2.2.2) + sprockets-rails (~> 2.0.0) + sdoc (0.4.0) + json (~> 1.8) + rdoc (~> 4.0, < 5.0) + sprockets (2.12.0) hike (~> 1.2) multi_json (~> 1.0) rack (~> 1.0) tilt (~> 1.1, != 1.3.0) - therubyracer (0.11.4) - libv8 (~> 3.11.8.12) + sprockets-rails (2.0.1) + actionpack (>= 3.0) + activesupport (>= 3.0) + sprockets (~> 2.8) + therubyracer (0.12.1) + libv8 (~> 3.16.14.0) ref - thor (0.16.0) - tilt (1.3.3) - treetop (1.4.12) + thor (0.19.1) + thread_safe (0.3.3) + tilt (1.4.1) + treetop (1.4.15) polyglot polyglot (>= 0.3.1) - twitter-bootstrap-rails (2.2.7) + turbolinks (2.2.2) + coffee-rails + twitter-bootstrap-rails (2.2.8) actionpack (>= 3.1) execjs rails (>= 3.1) railties (>= 3.1) - tzinfo (0.3.35) - uglifier (1.3.0) + tzinfo (0.3.39) + uglifier (2.5.0) execjs (>= 0.3.0) - multi_json (~> 1.0, >= 1.0.2) - warden (1.2.1) + json (>= 1.8.0) + unicorn (4.8.2) + kgio (~> 2.6) + rack + raindrops (~> 0.7) + warden (1.2.3) rack (>= 1.0) yajl-ruby (1.1.0) - zurb-foundation (3.2.3) - compass (>= 0.12.2) - modular-scale (>= 1.0.2) - rake + zurb-foundation (4.3.2) sass (>= 3.2.0) PLATFORMS ruby DEPENDENCIES + acts_as_commentable acts_as_tree + bcrypt-ruby (~> 3.0.0) cancan capistrano - carrierwave - coffee-rails (~> 3.2.1) + carrierwave (= 0.9.0) + coffee-rails (~> 4.0.0) compass-rails devise - formtastic + formtastic! geocoder - gravatar_image_tag - haml + haml-rails + htmlentities + jbuilder (~> 1.0.1) jquery-rails jquery-ui-rails kaminari + kaminari-bootstrap less-rails mysql2 nokogiri - pg pygments.rb - rails (= 3.2.9) - raptor-editor-rails + rails (= 4.0.0) redcarpet rmagick rvm-capistrano - sass-rails (~> 3.2.3) + sass-rails + sdoc therubyracer + turbolinks twitter-bootstrap-rails - uglifier (>= 1.0.3) + uglifier (>= 1.3.0) + unicorn zurb-foundation (>= 3.2) diff --git a/app/assets/javascripts/admin.js b/app/assets/javascripts/admin.js index fc679e8..de912ab 100644 --- a/app/assets/javascripts/admin.js +++ b/app/assets/javascripts/admin.js @@ -27,6 +27,7 @@ require ./shared/modernizr.js */ + $(document).ready(function(){ diff --git a/app/assets/javascripts/connexion.coffee b/app/assets/javascripts/connexion.coffee new file mode 100644 index 0000000..5127ddf --- /dev/null +++ b/app/assets/javascripts/connexion.coffee @@ -0,0 +1,6 @@ +#= require jquery +#= require jquery.ui.all +#= require twitter/bootstrap + +#= require ./shared/jquery.backstretch.js + diff --git a/app/assets/javascripts/connexion.js b/app/assets/javascripts/connexion.js deleted file mode 100644 index 54517a1..0000000 --- a/app/assets/javascripts/connexion.js +++ /dev/null @@ -1,10 +0,0 @@ -/* - -*= require jquery -*= require jquery_ujs - -*= require ./shared/modernizr - - - -*/ \ No newline at end of file diff --git a/app/assets/javascripts/forum.coffee b/app/assets/javascripts/forum.coffee new file mode 100644 index 0000000..7d14ee2 --- /dev/null +++ b/app/assets/javascripts/forum.coffee @@ -0,0 +1,84 @@ + +#= require jquery +#= require ./shared/jquery-ui +#= require twitter/bootstrap +#= require jquery_ujs + +#= require ./note_files/ajquery.ui.widget +#= require ./note_files/jquery.fileupload + + + +#= require redactor + + + +$(document).on "scroll", () -> + + if( $(this).scrollTop() <= 40 ) + top = 40 - $(this).scrollTop() + else + top = 0 + + $("#toolbar-text, .fix-submit").css + top : top + + +@init_user_images = -> + $(".images .user_image").click -> + src = undefined + src = $(this).data("src") + $("#message_form .content").redactor().insertHtml "" + false + + return + +editor = new Array() +$(document).ready -> + + $(".user_images").on "click", (event) -> + $(this).toggleClass("open") + + + $(".redactor_editor").on "click", "img", (event) -> + event.stopPropagation() + return + + + + #upload + drop = $(".user_images") + $(".user_images .fileupload").fileupload + url: $(this).attr("action") + dropZone: drop + autoUpload: true + progressall: (e, data) -> + progress = parseInt(data.loaded / data.total * 100, 10) + if progress is 100 + $(this).find(".progress").html "traitement en cours." + else + $(this).find(".progress").html progress + "% téléchargé." + return + + always: (e, data) -> + $(this).find(".progress").html "" + return + + drop: (e, data) -> + + drop.css "background", "white" + return + + drop.bind "dragover", (e) -> + $(this).css "background", "#B7DF63" + return + + drop.bind "dragleave", (e) -> + $(this).css "background", "white" + return + + $(".user_images .add_files").on "click", -> + $(this).next("input").click() + false + + return diff --git a/app/assets/javascripts/forum.js b/app/assets/javascripts/forum.js deleted file mode 100644 index ee0cf3d..0000000 --- a/app/assets/javascripts/forum.js +++ /dev/null @@ -1,137 +0,0 @@ -/* -*= require jquery - -*= require jquery_ujs - -*= require ./note_files/ajquery.ui.widget -*= require ./note_files/jquery.fileupload - -*= require ./shared/ace.js -*= require ./shared/mode-markdown.js -*= require ./shared/theme-textmate.js - -*/ - -var editor = new Array(); - -function init_user_images(){ - - $(".message_form").find(".images .user_image").click(function(){ - - var src; - src = $(this).data("src"); - - r= $(this).closest(".message_form").find("textarea.markdown").data("id"); - editor[r].focus(); - editor[r].insert("\n\n![]()\n\n"); - editor[r].focus(); - - - - - return false; - - - }); -} - -$(document).ready(function(){ - - $("textarea.markdown").each(function(){ - var r; - var ed; - - - - r = Math.floor((Math.random()*1000)+1); - - $(this).data("id", r); - - - $(this).attr("id", r+"-textarea"); - $(this).after('
bla
'); - - - - - editor[r] = ace.edit(r+"-editor"); - editor[r].setTheme("ace/theme/textmate"); - editor[r].getSession().setMode("ace/mode/markdown"); - - editor[r].setPrintMarginColumn(0); - - editor[r].session.setUseWrapMode(true); - - - - - - - editor[r].setHighlightActiveLine(false); - - editor[r].renderer.setShowGutter(false); - editor[r].renderer.setShowPrintMargin(false); - - editor[r].setFontSize("14px"); - - - - var textarea = $('#'+r+'-textarea').hide(); - editor[r].getSession().setValue(textarea.val()); - - editor[r].getSession().on('change', function(){ - - textarea.val(editor[r].getSession().getValue()); - - - }); - - - }); - - //upload - - drop = $('.user_images'); - - $('.user_images .fileupload').fileupload({ - url: $(this).attr("action"), - dropZone: drop, - autoUpload: true, - progressall: function (e, data) { - var progress = parseInt(data.loaded / data.total * 100, 10); - if(progress == 100){ - $(this).find('.progress').html('traitement en cours.'); - } - else{ - $(this).find('.progress').html(progress + '% téléchargé.');} - }, - always: function (e, data) { - $(this).find('.progress').html(""); - }, - - drop: function (e, data) { - - drop.css("background", "transparent"); - } - }); - - - drop.bind('dragover', function (e) { - $(this).css("background", "#B7DF63"); - - }); - - drop.bind('dragleave', function (e) { - $(this).css("background", "transparent"); - - }); - - $(".user_images .add_files").live("click",function(){ - - $(this).next('input').click(); - return false; - }); - - -}); - diff --git a/app/assets/javascripts/plaquettes.coffee b/app/assets/javascripts/plaquettes.coffee index 3c6f198..52b3e2c 100644 --- a/app/assets/javascripts/plaquettes.coffee +++ b/app/assets/javascripts/plaquettes.coffee @@ -1,6 +1,6 @@ #= require jquery #= require jquery_ujs -#= require jquery-ui +#= require jquery.ui.all #= require ./shared/jquery.ui.touch-punch #= require ./shared/jquery-jPuzzle @@ -100,49 +100,6 @@ $ -> - - - $(".places_jeu2").each -> - $(this).find(".receptable").droppable - tolerance: "touch" - accept: (e) -> - if e.hasClass("intru") == false and $(this).find("img").size() == 0 - true - drop: ( event, ui ) -> - - $( this ).append(ui.draggable) - ui.draggable.attr("style", "") - - if $(this).closest(".places_jeu2").find(".vignettes img").size() == 2 - $(this).closest(".places_jeu2").find(".success").show() - - $(this).find(".vignettes img").draggable - #connectWith: ".receptable" - tolerance: "pointer" - revert: "invalid" - - - - $(".places_jeu").each -> - $(this).find(".receptable").droppable - tolerance: "touch" - accept: (e) -> - if e.data("rep") == $(this).data("rep") - true - drop: ( event, ui ) -> - - $( this ).append(ui.draggable) - ui.draggable.attr("style", "") - - if $(this).closest(".places_jeu").find(".vignettes img").size() == 0 - $(this).closest(".places_jeu").find(".success").show() - - $(this).find(".vignettes img").draggable - #connectWith: ".receptable" - tolerance: "pointer" - revert: "invalid" - - @@ -179,7 +136,65 @@ $ -> test_question($(this).closest(".question")) + + + + +intialize_places_jeu2 = () -> + $(".places_jeu2").each -> + archive = $(this).html() + $(this).find(".receptable").droppable + tolerance: "touch" + accept: (e) -> + if e.hasClass("intru") == false and $(this).find("img").size() == 0 + true + drop: ( event, ui ) -> + + $( this ).append(ui.draggable) + ui.draggable.attr("style", "") + + if $(this).closest(".places_jeu2").find(".vignettes img").size() == 2 + $(this).closest(".places_jeu2").find(".success").show() + + $(this).find(".vignettes img").draggable + #connectWith: ".receptable" + tolerance: "pointer" + revert: "invalid" + + $(this).find(".reset").click -> + $(this).closest(".places_jeu2").html archive + $(this).closest(".places_jeu2").find(".success").hide() + intialize_places_jeu2() + + +intialize_places_jeu = () -> + $(".places_jeu").each -> + archive = $(this).html() + $(this).find(".receptable").droppable + tolerance: "touch" + accept: (e) -> + if e.data("rep") == $(this).data("rep") + true + drop: ( event, ui ) -> + + $( this ).append(ui.draggable) + ui.draggable.attr("style", "") + if $(this).closest(".places_jeu").find(".vignettes img").size() == 0 + $(this).closest(".places_jeu").find(".success").show() + + $(this).find(".vignettes img").draggable + #connectWith: ".receptable" + tolerance: "pointer" + revert: "invalid" + + $(this).find(".reset").click -> + $(this).closest(".places_jeu").html archive + $(this).closest(".places_jeu").find(".success").hide() + intialize_places_jeu() + + + intialize_puzzle = () -> $(".puzzle").each -> archive = $(this).html() @@ -220,7 +235,7 @@ intialize_arbre = () -> win = false unless i is $(this).data("order") if win is true - $(".success").show() + $(".vie-arbre-place .success").show() $(".vie-arbre.story").closest(".sortable_quizz").find(".reset").click -> $(".vie-arbre.story").closest(".sortable_quizz").html archive @@ -259,7 +274,8 @@ $(document).ready -> - + intialize_places_jeu2() + intialize_places_jeu() diff --git a/app/assets/javascripts/redactor.js b/app/assets/javascripts/redactor.js new file mode 100755 index 0000000..ec3659a --- /dev/null +++ b/app/assets/javascripts/redactor.js @@ -0,0 +1,4269 @@ +/* + Redactor v8.2.2 + Updated: January 17, 2013 + + http://redactorjs.com/ + + Copyright (c) 2009-2013, Imperavi Inc. + License: http://redactorjs.com/license/ + + Usage: $('#content').redactor(); +*/ + +var rwindow, rdocument; + +if (typeof RELANG === 'undefined') +{ + var RELANG = {}; +} + +var RLANG = { + html: 'HTML', + video: 'Insert Video', + image: 'Insert Image', + table: 'Table', + link: 'Link', + link_insert: 'Insert link', + unlink: 'Unlink', + formatting: 'Formatting', + paragraph: 'Paragraph', + quote: 'Quote', + code: 'Code', + header1: 'Header 1', + header2: 'Header 2', + header3: 'Header 3', + header4: 'Header 4', + bold: 'Bold', + italic: 'Italic', + fontcolor: 'Font Color', + backcolor: 'Back Color', + unorderedlist: 'Unordered List', + orderedlist: 'Ordered List', + outdent: 'Outdent', + indent: 'Indent', + cancel: 'Cancel', + insert: 'Insert', + save: 'Save', + _delete: 'Delete', + insert_table: 'Insert Table', + insert_row_above: 'Add Row Above', + insert_row_below: 'Add Row Below', + insert_column_left: 'Add Column Left', + insert_column_right: 'Add Column Right', + delete_column: 'Delete Column', + delete_row: 'Delete Row', + delete_table: 'Delete Table', + rows: 'Rows', + columns: 'Columns', + add_head: 'Add Head', + delete_head: 'Delete Head', + title: 'Title', + image_position: 'Position', + none: 'None', + left: 'Left', + right: 'Right', + image_web_link: 'Image Web Link', + text: 'Text', + mailto: 'Email', + web: 'URL', + video_html_code: 'Video Embed Code', + file: 'Insert File', + upload: 'Upload', + download: 'Download', + choose: 'Choose', + or_choose: 'Or choose', + drop_file_here: 'Drop file here', + align_left: 'Align text to the left', + align_center: 'Center text', + align_right: 'Align text to the right', + align_justify: 'Justify text', + horizontalrule: 'Insert Horizontal Rule', + deleted: 'Deleted', + anchor: 'Anchor', + link_new_tab: 'Open link in new tab', + underline: 'Underline', + alignment: 'Alignment' +}; + +(function($){ + + // Plugin + jQuery.fn.redactor = function(option) + { + return this.each(function() + { + var $obj = $(this); + + var data = $obj.data('redactor'); + if (!data) + { + $obj.data('redactor', (data = new Redactor(this, option))); + } + }); + }; + + + // Initialization + var Redactor = function(element, options) + { + // Element + this.$el = $(element); + + // Lang + if (typeof options !== 'undefined' && typeof options.lang !== 'undefined' && options.lang !== 'en' && typeof RELANG[options.lang] !== 'undefined') + { + RLANG = RELANG[options.lang]; + } + + // Options + this.opts = $.extend({ + + iframe: false, + css: false, // url + + lang: 'en', + direction: 'ltr', // ltr or rtl + + callback: false, // function + keyupCallback: false, // function + keydownCallback: false, // function + execCommandCallback: false, // function + + plugins: false, + cleanup: true, + + focus: false, + tabindex: false, + autoresize: true, + minHeight: false, + fixed: false, + fixedTop: 0, // pixels + fixedBox: false, + source: true, + shortcuts: true, + + mobile: true, + air: false, // true or toolbar + wym: false, + + convertLinks: true, + convertDivs: true, + protocol: 'http://', // for links http or https or ftp or false + + autosave: false, // false or url + autosaveCallback: false, // function + interval: 60, // seconds + + imageGetJson: false, // url (ex. /folder/images.json ) or false + + imageUpload: false, // url + imageUploadCallback: false, // function + imageUploadErrorCallback: false, // function + + fileUpload: false, // url + fileUploadCallback: false, // function + fileUploadErrorCallback: false, // function + + uploadCrossDomain: false, + uploadFields: false, + + observeImages: true, + overlay: true, // modal overlay + + allowedTags: ["form", "input", "button", "select", "option", "datalist", "output", "textarea", "fieldset", "legend", + "section", "header", "hgroup", "aside", "footer", "article", "details", "nav", "progress", "time", "canvas", + "code", "span", "div", "label", "a", "br", "p", "b", "i", "del", "strike", "u", + "img", "video", "source", "track", "audio", "iframe", "object", "embed", "param", "blockquote", + "mark", "cite", "small", "ul", "ol", "li", "hr", "dl", "dt", "dd", "sup", "sub", + "big", "pre", "code", "figure", "figcaption", "strong", "em", "table", "tr", "td", + "th", "tbody", "thead", "tfoot", "h1", "h2", "h3", "h4", "h5", "h6"], + + toolbarExternal: false, // ID selector + + buttonsCustom: {}, + buttonsAdd: [], + buttons: ['html', '|', 'formatting', '|', 'bold', 'italic', 'deleted', '|', 'unorderedlist', 'orderedlist', 'outdent', 'indent', '|', + 'image', 'video', 'file', 'table', 'link', '|', + 'fontcolor', 'backcolor', '|', 'alignment', '|', 'horizontalrule'], // 'underline', 'alignleft', 'aligncenter', 'alignright', 'justify' + + airButtons: ['formatting', '|', 'bold', 'italic', 'deleted', '|', 'unorderedlist', 'orderedlist', 'outdent', 'indent', '|', 'fontcolor', 'backcolor'], + + formattingTags: ['p', 'blockquote', 'pre', 'h1', 'h2', 'h3', 'h4'], + + activeButtons: ['deleted', 'italic', 'bold', 'underline', 'unorderedlist', 'orderedlist'], // 'alignleft', 'aligncenter', 'alignright', 'justify' + activeButtonsStates: { + b: 'bold', + strong: 'bold', + i: 'italic', + em: 'italic', + del: 'deleted', + strike: 'deleted', + ul: 'unorderedlist', + ol: 'orderedlist', + u: 'underline' + }, + + colors: [ + '#ffffff', '#000000', '#eeece1', '#1f497d', '#4f81bd', '#c0504d', '#9bbb59', '#8064a2', '#4bacc6', '#f79646', '#ffff00', + '#f2f2f2', '#7f7f7f', '#ddd9c3', '#c6d9f0', '#dbe5f1', '#f2dcdb', '#ebf1dd', '#e5e0ec', '#dbeef3', '#fdeada', '#fff2ca', + '#d8d8d8', '#595959', '#c4bd97', '#8db3e2', '#b8cce4', '#e5b9b7', '#d7e3bc', '#ccc1d9', '#b7dde8', '#fbd5b5', '#ffe694', + '#bfbfbf', '#3f3f3f', '#938953', '#548dd4', '#95b3d7', '#d99694', '#c3d69b', '#b2a2c7', '#b7dde8', '#fac08f', '#f2c314', + '#a5a5a5', '#262626', '#494429', '#17365d', '#366092', '#953734', '#76923c', '#5f497a', '#92cddc', '#e36c09', '#c09100', + '#7f7f7f', '#0c0c0c', '#1d1b10', '#0f243e', '#244061', '#632423', '#4f6128', '#3f3151', '#31859b', '#974806', '#7f6000'], + + // private + emptyHtml: '


', + buffer: false, + visual: true, + + // modal windows container + modal_file: String() + + '
' + + '
' + + '' + + '' + + '
' + + '' + + '
' + + '

' + + '
', + + modal_image_edit: String() + + '
' + + '' + + '' + + '' + + '' + + '' + + '' + + '
' + + '', + + modal_image: String() + + '
' + + '' + + '
' + + '
' + + '' + + '
' + + '' + + '
' + + '' + + '
' + + '', + + modal_link: String() + + '
' + + '
' + + '
' + + 'URL' + + 'Email' + + '' + RLANG.anchor + '' + + '
' + + '' + + '
' + + '' + + '' + + '' + + '
' + + '' + + '' + + '
' + + '
' + + '', + + modal_table: String() + + '
' + + '' + + '' + + '' + + '' + + '
' + + '', + + modal_video: String() + + '
' + + '
' + + '' + + '' + + '
' + + '
'+ + '', + + toolbar: { + html: + { + title: RLANG.html, + func: 'toggle' + }, + formatting: + { + title: RLANG.formatting, + func: 'show', + dropdown: + { + p: + { + title: RLANG.paragraph, + exec: 'formatblock' + }, + blockquote: + { + title: RLANG.quote, + exec: 'formatblock', + className: 'redactor_format_blockquote' + }, + pre: + { + title: RLANG.code, + exec: 'formatblock', + className: 'redactor_format_pre' + }, + h1: + { + title: RLANG.header1, + exec: 'formatblock', + className: 'redactor_format_h1' + }, + h2: + { + title: RLANG.header2, + exec: 'formatblock', + className: 'redactor_format_h2' + }, + h3: + { + title: RLANG.header3, + exec: 'formatblock', + className: 'redactor_format_h3' + }, + h4: + { + title: RLANG.header4, + exec: 'formatblock', + className: 'redactor_format_h4' + } + } + }, + bold: + { + title: RLANG.bold, + exec: 'bold' + }, + italic: + { + title: RLANG.italic, + exec: 'italic' + }, + deleted: + { + title: RLANG.deleted, + exec: 'strikethrough' + }, + underline: + { + title: RLANG.underline, + exec: 'underline' + }, + unorderedlist: + { + title: '• ' + RLANG.unorderedlist, + exec: 'insertunorderedlist' + }, + orderedlist: + { + title: '1. ' + RLANG.orderedlist, + exec: 'insertorderedlist' + }, + outdent: + { + title: '< ' + RLANG.outdent, + exec: 'outdent' + }, + indent: + { + title: '> ' + RLANG.indent, + exec: 'indent' + }, + image: + { + title: RLANG.image, + func: 'showImage' + }, + video: + { + title: RLANG.video, + func: 'showVideo' + }, + file: + { + title: RLANG.file, + func: 'showFile' + }, + table: + { + title: RLANG.table, + func: 'show', + dropdown: + { + insert_table: + { + title: RLANG.insert_table, + func: 'showTable' + }, + separator_drop1: + { + name: 'separator' + }, + insert_row_above: + { + title: RLANG.insert_row_above, + func: 'insertRowAbove' + }, + insert_row_below: + { + title: RLANG.insert_row_below, + func: 'insertRowBelow' + }, + insert_column_left: + { + title: RLANG.insert_column_left, + func: 'insertColumnLeft' + }, + insert_column_right: + { + title: RLANG.insert_column_right, + func: 'insertColumnRight' + }, + separator_drop2: + { + name: 'separator' + }, + add_head: + { + title: RLANG.add_head, + func: 'addHead' + }, + delete_head: + { + title: RLANG.delete_head, + func: 'deleteHead' + }, + separator_drop3: + { + name: 'separator' + }, + delete_column: + { + title: RLANG.delete_column, + func: 'deleteColumn' + }, + delete_row: + { + title: RLANG.delete_row, + func: 'deleteRow' + }, + delete_table: + { + title: RLANG.delete_table, + func: 'deleteTable' + } + } + }, + link: + { + title: RLANG.link, + func: 'show', + dropdown: + { + link: + { + title: RLANG.link_insert, + func: 'showLink' + }, + unlink: + { + title: RLANG.unlink, + exec: 'unlink' + } + } + }, + fontcolor: + { + title: RLANG.fontcolor, + func: 'show' + }, + backcolor: + { + title: RLANG.backcolor, + func: 'show' + }, + alignment: + { + title: RLANG.alignment, + func: 'show', + dropdown: + { + alignleft: + { + title: RLANG.align_left, + exec: 'JustifyLeft' + }, + aligncenter: + { + title: RLANG.align_center, + exec: 'JustifyCenter' + }, + alignright: + { + title: RLANG.align_right, + exec: 'JustifyRight' + }, + justify: + { + title: RLANG.align_justify, + exec: 'JustifyFull' + } + } + }, + alignleft: + { + exec: 'JustifyLeft', + title: RLANG.align_left + }, + aligncenter: + { + exec: 'JustifyCenter', + title: RLANG.align_center + }, + alignright: + { + exec: 'JustifyRight', + title: RLANG.align_right + }, + justify: + { + exec: 'JustifyFull', + title: RLANG.align_justify + }, + horizontalrule: + { + exec: 'inserthorizontalrule', + title: RLANG.horizontalrule + } + } + + + }, options, this.$el.data()); + + this.dropdowns = []; + + // Init + this.init(); + }; + + // Functionality + Redactor.prototype = { + + + // Initialization + init: function() + { + // get dimensions + this.height = this.$el.css('height'); + this.width = this.$el.css('width'); + + rdocument = this.document = document; + rwindow = this.window = window; + + // mobile + if (this.opts.mobile === false && this.isMobile()) + { + this.build(true); + return false; + } + + // iframe + if (this.opts.iframe) + { + this.opts.autoresize = false; + } + + // extend buttons + if (this.opts.air) + { + this.opts.buttons = this.opts.airButtons; + } + else if (this.opts.toolbar !== false) + { + if (this.opts.source === false) + { + var index = this.opts.buttons.indexOf('html'); + var next = this.opts.buttons[index+1]; + this.opts.buttons.splice(index, 1); + if (typeof next !== 'undefined' && next === '|') + { + this.opts.buttons.splice(index, 1); + } + } + + $.extend(this.opts.toolbar, this.opts.buttonsCustom); + $.each(this.opts.buttonsAdd, $.proxy(function(i,s) + { + this.opts.buttons.push(s); + + }, this)); + } + + // formatting tags + if (this.opts.toolbar !== false) + { + $.each(this.opts.toolbar.formatting.dropdown, $.proxy(function(i,s) + { + if ($.inArray(i, this.opts.formattingTags) == '-1') + { + delete this.opts.toolbar.formatting.dropdown[i]; + } + + }, this)); + } + + function afterBuild() + { + // air enable + this.enableAir(); + + // toolbar + this.buildToolbar(); + + // PLUGINS + if (typeof this.opts.plugins === 'object') + { + $.each(this.opts.plugins, $.proxy(function(i,s) + { + if (typeof RedactorPlugins[s] !== 'undefined') + { + $.extend(this, RedactorPlugins[s]); + + if (typeof RedactorPlugins[s].init !== 'undefined') + { + this.init(); + } + } + + }, this)); + } + + // buttons response + if (this.opts.activeButtons !== false && this.opts.toolbar !== false) + { + var observeFormatting = $.proxy(function() { this.observeFormatting(); }, this); + this.$editor.click(observeFormatting).keyup(observeFormatting); + } + + // paste + var oldsafari = false; + if (this.browser('webkit') && navigator.userAgent.indexOf('Chrome') === -1) + { + var arr = this.browser('version').split('.'); + if (arr[0] < 536) oldsafari = true; + } + + if (this.isMobile(true) === false && oldsafari === false) + { + this.$editor.bind('paste', $.proxy(function(e) + { + if (this.opts.cleanup === false) + { + return true; + } + + this.pasteRunning = true; + + this.setBuffer(); + + if (this.opts.autoresize === true) + { + this.saveScroll = this.document.body.scrollTop; + } + else + { + this.saveScroll = this.$editor.scrollTop(); + } + + var frag = this.extractContent(); + + setTimeout($.proxy(function() + { + var pastedFrag = this.extractContent(); + this.$editor.append(frag); + + this.restoreSelection(); + + var html = this.getFragmentHtml(pastedFrag); + this.pasteCleanUp(html); + this.pasteRunning = false; + + }, this), 1); + + }, this)); + } + + // key handlers + this.keyup(); + this.keydown(); + + // autosave + if (this.opts.autosave !== false) + { + this.autoSave(); + } + + // observers + setTimeout($.proxy(function() + { + this.observeImages(); + this.observeTables(); + + }, this), 1); + + // FF fix + if (this.browser('mozilla')) + { + this.$editor.click($.proxy(function() + { + this.saveSelection(); + }, this)); + + try + { + this.document.execCommand('enableObjectResizing', false, false); + this.document.execCommand('enableInlineTableEditing', false, false); + } + catch (e) {} + } + + // focus + if (this.opts.focus) + { + setTimeout($.proxy(function(){ + this.$editor.focus(); + }, this), 1); + } + + // fixed + if (this.opts.fixed) + { + this.observeScroll(); + $(document).scroll($.proxy(this.observeScroll, this)); + } + + // callback + if (typeof this.opts.callback === 'function') + { + this.opts.callback(this); + } + + if (this.opts.toolbar !== false) + { + this.$toolbar.find('a').attr('tabindex', '-1'); + } + } + + // construct editor + this.build(false, afterBuild); + + }, + shortcuts: function(e, cmd) + { + e.preventDefault(); + this.execCommand(cmd, false); + }, + keyup: function() + { + this.$editor.keyup($.proxy(function(e) + { + var key = e.keyCode || e.which; + + if (this.browser('mozilla') && !this.pasteRunning) + { + this.saveSelection(); + } + + // callback as you type + if (typeof this.opts.keyupCallback === 'function') + { + this.opts.keyupCallback(this, e); + } + + // if empty + if (key === 8 || key === 46) + { + this.observeImages(); + return this.formatEmpty(e); + } + + // new line p + if (key === 13 && !e.shiftKey && !e.ctrlKey && !e.metaKey) + { + if (this.browser('webkit')) + { + this.formatNewLine(e); + } + + // convert links + if (this.opts.convertLinks) + { + this.$editor.linkify(); + } + } + + this.syncCode(); + + }, this)); + }, + keydown: function() + { + this.$editor.keydown($.proxy(function(e) + { + var key = e.keyCode || e.which; + var parent = this.getParentNode(); + var current = this.getCurrentNode(); + var pre = false; + var ctrl = e.ctrlKey || e.metaKey; + + if ((parent || current) && ($(parent).get(0).tagName === 'PRE' || $(current).get(0).tagName === 'PRE')) + { + pre = true; + } + + // callback keydown + if (typeof this.opts.keydownCallback === 'function') + { + this.opts.keydownCallback(this, e); + } + + if (ctrl && this.opts.shortcuts) + { + if (key === 90) + { + if (this.opts.buffer !== false) + { + e.preventDefault(); + this.getBuffer(); + } + else if (e.shiftKey) + { + this.shortcuts(e, 'redo'); // Ctrl + Shift + z + } + else + { + this.shortcuts(e, 'undo'); // Ctrl + z + } + } + else if (key === 77) + { + this.shortcuts(e, 'removeFormat'); // Ctrl + m + } + else if (key === 66) + { + this.shortcuts(e, 'bold'); // Ctrl + b + } + else if (key === 73) + { + this.shortcuts(e, 'italic'); // Ctrl + i + } + else if (key === 74) + { + this.shortcuts(e, 'insertunorderedlist'); // Ctrl + j + } + else if (key === 75) + { + this.shortcuts(e, 'insertorderedlist'); // Ctrl + k + } + else if (key === 76) + { + this.shortcuts(e, 'superscript'); // Ctrl + l + } + else if (key === 72) + { + this.shortcuts(e, 'subscript'); // Ctrl + h + } + } + + // clear undo buffer + if (!ctrl && key !== 90) + { + this.opts.buffer = false; + } + + // enter + if (pre === true && key === 13) + { + e.preventDefault(); + + var html = $(current).parent().text(); + this.insertNodeAtCaret(this.document.createTextNode('\r\n')); + if (html.search(/\s$/) == -1) + { + this.insertNodeAtCaret(this.document.createTextNode('\r\n')); + } + this.syncCode(); + + return false; + } + + // tab + if (this.opts.shortcuts && !e.shiftKey && key === 9) + { + if (pre === false) + { + this.shortcuts(e, 'indent'); // Tab + } + else + { + e.preventDefault(); + this.insertNodeAtCaret(this.document.createTextNode('\t')); + this.syncCode(); + return false; + } + } + else if (this.opts.shortcuts && e.shiftKey && key === 9 ) + { + this.shortcuts(e, 'outdent'); // Shift + tab + } + + // safari shift key + enter + if (this.browser('webkit') && navigator.userAgent.indexOf('Chrome') === -1) + { + return this.safariShiftKeyEnter(e, key); + } + }, this)); + }, + build: function(mobile, whendone) + { + if (mobile !== true) + { + // container + this.$box = $('
'); + + // air box + if (this.opts.air) + { + this.air = $(''); + } + + this.$content = null; + + function initFrame() + { + this.$editor = this.$content.contents().find("body").attr('contenteditable', true).attr('dir', this.opts.direction); + + rdocument = this.document = this.$editor[0].ownerDocument; + rwindow = this.window = this.document.defaultView || window; + + if (this.opts.css !== false) + { + this.$content.contents().find('head').append(''); + } + + this.$editor.html(html); + + if (whendone) + { + whendone.call(this); + whendone = null; + } + } + + // editor + this.textareamode = true; + if (this.$el.get(0).tagName === 'TEXTAREA') + { + if(this.opts.iframe) + { + var me = this; + this.$content = $('').load(function() + { + initFrame.call(me); + }); + } + else + { + this.$content = this.$editor = $('
'); + } + + var classlist = this.$el.get(0).className.split(/\s+/); + $.each(classlist, $.proxy(function(i,s) + { + this.$content.addClass('redactor_' + s); + }, this)); + } + else + { + this.textareamode = false; + this.$content = this.$editor = this.$el; + this.$el = $('').css('height', this.height); + } + + if (this.$editor) + { + this.$editor.addClass('redactor_editor').attr('contenteditable', true).attr('dir', this.opts.direction); + } + + if (this.opts.tabindex !== false) + { + this.$content.attr('tabindex', this.opts.tabindex); + } + + if (this.opts.minHeight !== false) + { + this.$content.css('min-height', this.opts.minHeight + 'px'); + } + + if (this.opts.wym === true) + { + this.$content.addClass('redactor_editor_wym'); + } + + if (this.opts.autoresize === false) + { + this.$content.css('height', this.height); + } + + // hide textarea + this.$el.hide(); + + // append box and frame + var html = ''; + if (this.textareamode) + { + // get html + html = this.$el.val(); + html = this.savePreCode(html); + + this.$box.insertAfter(this.$el).append(this.$content).append(this.$el); + } + else + { + // get html + html = this.$editor.html(); + html = this.savePreCode(html); + + this.$box.insertAfter(this.$content).append(this.$el).append(this.$editor); + + } + + // conver newlines to p + html = this.paragraphy(html); + + // enable + if (this.$editor) + { + this.$editor.html(html); + } + + if (this.textareamode === false) + { + this.syncCode(); + } + } + else + { + if (this.$el.get(0).tagName !== 'TEXTAREA') + { + var html = this.$el.val(); + var textarea = $('').css('height', this.height).val(html); + this.$el.hide(); + this.$el.after(textarea); + } + } + + if (whendone && this.$editor) + { + whendone.call(this); + } + + }, + enableAir: function() + { + if (this.opts.air === false) + { + return false; + } + + this.air.hide(); + + this.$editor.bind('textselect', $.proxy(function(e) + { + this.showAir(e); + + }, this)); + + this.$editor.bind('textunselect', $.proxy(function() + { + this.air.hide(); + + }, this)); + + }, + showAir: function(e) + { + $('.redactor_air').hide(); + + var width = this.air.innerWidth(); + var left = e.clientX; + + if ($(this.document).width() < (left + width)) + { + left = left - width; + } + + var top = e.clientY + $(document).scrollTop() + 14; + if (this.opts.iframe === true) + { + top = top + this.$box.position().top; + left = left + this.$box.position().left; + } + + this.air.css({ left: left + 'px', top: top + 'px' }).show(); + }, + syncCode: function() + { + this.$el.val(this.$editor.html()); + }, + + // API functions + setCode: function(html) + { + html = this.stripTags(html); + this.$editor.html(html).focus(); + + this.syncCode(); + }, + getCode: function() + { + var html = ''; + if (this.opts.visual) + { + html = this.$editor.html() + } + else + { + html = this.$el.val(); + } + + return this.stripTags(html); + }, + insertHtml: function(html) + { + this.$editor.focus(); + this.pasteHtmlAtCaret(html); + this.observeImages(); + this.syncCode(); + }, + + pasteHtmlAtCaret: function (html) + { + var sel, range; + if (this.document.getSelection) + { + sel = this.window.getSelection(); + if (sel.getRangeAt && sel.rangeCount) + { + range = sel.getRangeAt(0); + range.deleteContents(); + var el = this.document.createElement("div"); + el.innerHTML = html; + var frag = this.document.createDocumentFragment(), node, lastNode; + while (node = el.firstChild) + { + lastNode = frag.appendChild(node); + } + range.insertNode(frag); + + if (lastNode) + { + range = range.cloneRange(); + range.setStartAfter(lastNode); + range.collapse(true); + sel.removeAllRanges(); + sel.addRange(range); + } + } + } + else if (this.document.selection && this.document.selection.type != "Control") + { + this.document.selection.createRange().pasteHTML(html); + } + }, + + destroy: function() + { + var html = this.getCode(); + + if (this.textareamode) + { + this.$box.after(this.$el); + this.$box.remove(); + this.$el.height(this.height).val(html).show(); + } + else + { + this.$box.after(this.$editor); + this.$box.remove(); + this.$editor.removeClass('redactor_editor').removeClass('redactor_editor_wym').attr('contenteditable', false).html(html).show(); + } + + if (this.opts.toolbarExternal) + { + $(this.opts.toolbarExternal).empty(); + } + + $('.redactor_air').remove(); + + for (var i = 0; i < this.dropdowns.length; i++) + { + this.dropdowns[i].remove(); + delete(this.dropdowns[i]); + } + + if (this.opts.autosave !== false) + { + clearInterval(this.autosaveInterval); + } + + }, + // end API functions + + // OBSERVERS + observeFormatting: function() + { + var parent = this.getCurrentNode(); + + this.inactiveAllButtons(); + + $.each(this.opts.activeButtonsStates, $.proxy(function(i,s) + { + if ($(parent).closest(i,this.$editor.get()[0]).length != 0) + { + this.setBtnActive(s); + } + + }, this)); + + var tag = $(parent).closest(['p', 'div', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'blockquote', 'td']); + + if (typeof tag[0] !== 'undefined' && typeof tag[0].elem !== 'undefined' && $(tag[0].elem).size() != 0) + { + var align = $(tag[0].elem).css('text-align'); + + switch (align) + { + case 'right': + this.setBtnActive('alignright'); + break; + case 'center': + this.setBtnActive('aligncenter'); + break; + case 'justify': + this.setBtnActive('justify'); + break; + default: + this.setBtnActive('alignleft'); + break; + } + } + }, + observeImages: function() + { + /*if (this.opts.observeImages === false) + { + return false; + } + + this.$editor.find('img').each($.proxy(function(i,s) + { + if (this.browser('msie')) + { + $(s).attr('unselectable', 'on'); + } + + this.resizeImage(s); + + }, this));*/ + + }, + observeTables: function() + { + this.$editor.find('table').click($.proxy(this.tableObserver, this)); + }, + observeScroll: function() + { + var scrolltop = $(this.document).scrollTop(); + var boxtop = this.$box.offset().top; + var left = 0; + + if (scrolltop > boxtop) + { + var width = '100%'; + if (this.opts.fixedBox) + { + left = this.$box.offset().left; + width = this.$box.innerWidth(); + } + + this.fixed = true; + this.$toolbar.css({ position: 'fixed', width: width, zIndex: 1005, top: this.opts.fixedTop + 'px', left: left }); + } + else + { + this.fixed = false; + this.$toolbar.css({ position: 'relative', width: 'auto', zIndex: 1, top: 0, left: left }); + } + }, + + // BUFFER + setBuffer: function() + { + this.saveSelection(); + this.opts.buffer = this.$editor.html(); + }, + getBuffer: function() + { + if (this.opts.buffer === false) + { + return false; + } + + this.$editor.html(this.opts.buffer); + + if (!this.browser('msie')) + { + this.restoreSelection(); + } + + this.opts.buffer = false; + }, + + + + // EXECCOMMAND + execCommand: function(cmd, param) + { + if (this.opts.visual == false) + { + this.$el.focus(); + return false; + } + + try + { + + var parent; + + if (cmd === 'inserthtml') + { + if (this.browser('msie')) + { + this.$editor.focus(); + this.document.selection.createRange().pasteHTML(param); + } + else + { + this.pasteHtmlAtCaret(param); + //this.execRun(cmd, param); + } + + this.observeImages(); + } + else if (cmd === 'unlink') + { + parent = this.getParentNode(); + if ($(parent).get(0).tagName === 'A') + { + $(parent).replaceWith($(parent).text()); + } + else + { + this.execRun(cmd, param); + } + } + else if (cmd === 'JustifyLeft' || cmd === 'JustifyCenter' || cmd === 'JustifyRight' || cmd === 'JustifyFull') + { + parent = this.getCurrentNode(); + var tag = $(parent).get(0).tagName; + + if (this.opts.iframe === false && $(parent).parents('.redactor_editor').size() == 0) + { + return false; + } + + var tagsArray = ['P', 'DIV', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'BLOCKQUOTE', 'TD']; + if ($.inArray(tag, tagsArray) != -1) + { + var align = false; + + if (cmd === 'JustifyCenter') + { + align = 'center'; + } + else if (cmd === 'JustifyRight') + { + align = 'right'; + } + else if (cmd === 'JustifyFull') + { + align = 'justify'; + } + + if (align === false) + { + $(parent).css('text-align', ''); + } + else + { + $(parent).css('text-align', align); + } + } + else + { + this.execRun(cmd, param); + } + } + else if (cmd === 'formatblock' && param === 'blockquote') + { + parent = this.getCurrentNode(); + if ($(parent).get(0).tagName === 'BLOCKQUOTE') + { + if (this.browser('msie')) + { + var node = $('

' + $(parent).html() + '

'); + $(parent).replaceWith(node); + } + else + { + this.execRun(cmd, 'p'); + } + } + else if ($(parent).get(0).tagName === 'P') + { + var parent2 = $(parent).parent(); + if ($(parent2).get(0).tagName === 'BLOCKQUOTE') + { + var node = $('

' + $(parent).html() + '

'); + $(parent2).replaceWith(node); + this.setSelection(node[0], 0, node[0], 0); + } + else + { + if (this.browser('msie')) + { + var node = $('
' + $(parent).html() + '
'); + $(parent).replaceWith(node); + } + else + { + this.execRun(cmd, param); + } + } + } + else + { + this.execRun(cmd, param); + } + } + else if (cmd === 'formatblock' && (param === 'pre' || param === 'p')) + { + parent = this.getParentNode(); + + if ($(parent).get(0).tagName === 'PRE') + { + $(parent).replaceWith('

' + this.encodeEntities($(parent).text()) + '

'); + } + else + { + this.execRun(cmd, param); + } + } + else + { + if (cmd === 'inserthorizontalrule' && this.browser('msie')) + { + this.$editor.focus(); + } + + if (cmd === 'formatblock' && this.browser('mozilla')) + { + this.$editor.focus(); + } + + this.execRun(cmd, param); + } + + if (cmd === 'inserthorizontalrule') + { + this.$editor.find('hr').removeAttr('id'); + } + + this.syncCode(); + + if (this.oldIE()) + { + this.$editor.focus(); + } + + if (typeof this.opts.execCommandCallback === 'function') + { + this.opts.execCommandCallback(this, cmd); + } + + if (this.opts.air) + { + this.air.hide(); + } + } + catch (e) { } + }, + execRun: function(cmd, param) + { + if (cmd === 'formatblock' && this.browser('msie')) + { + param = '<' + param + '>'; + } + + this.document.execCommand(cmd, false, param); + }, + + // FORMAT NEW LINE + formatNewLine: function(e) + { + var parent = this.getParentNode(); + + if (parent.nodeName === 'DIV' && parent.className === 'redactor_editor') + { + var element = $(this.getCurrentNode()); + + if (element.get(0).tagName === 'DIV' && (element.html() === '' || element.html() === '
')) + { + var newElement = $('

').append(element.clone().get(0).childNodes); + element.replaceWith(newElement); + newElement.html('
'); + this.setSelection(newElement[0], 0, newElement[0], 0); + } + } + }, + + // SAFARI SHIFT KEY + ENTER + safariShiftKeyEnter: function(e, key) + { + if (e.shiftKey && key === 13) + { + e.preventDefault(); + this.insertNodeAtCaret($('
').get(0)); + this.syncCode(); + return false; + } + else + { + return true; + } + }, + + // FORMAT EMPTY + formatEmpty: function(e) + { + var html = $.trim(this.$editor.html()); + + if (this.browser('mozilla')) + { + html = html.replace(/
/i, ''); + } + + var thtml = html.replace(/<(?:.|\n)*?>/gm, ''); + + if (html === '' || thtml === '') + { + e.preventDefault(); + + var node = $(this.opts.emptyHtml).get(0); + this.$editor.html(node); + this.setSelection(node, 0, node, 0); + + this.syncCode(); + return false; + } + else + { + this.syncCode(); + } + }, + + // PARAGRAPHY + paragraphy: function (str) + { + str = $.trim(str); + if (str === '' || str === '

') + { + return this.opts.emptyHtml; + } + + // convert div to p + if (this.opts.convertDivs) + { + str = str.replace(/([\w\W]*?)<\/div>/gi, '

$2

'); + } + + // inner functions + var X = function(x, a, b) { return x.replace(new RegExp(a, 'g'), b); }; + var R = function(a, b) { return X(str, a, b); }; + + // block elements + var blocks = '(table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|address|math|style|script|object|input|param|p|h[1-6])'; + + //str = '

' + str; + str += '\n'; + + R('
\\s*
', '\n\n'); + R('(<' + blocks + '[^>]*>)', '\n$1'); + R('()', '$1\n\n'); + R('\r\n|\r', '\n'); // newlines + R('\n\n+', '\n\n'); // remove duplicates + R('\n?((.|\n)+?)$', '

$1

\n'); // including one at the end + R('

\\s*?

', ''); // remove empty p + R('

(]*>\\s*)', '$1

'); + R('

([^<]+)\\s*?(]*>)', '

$1

$2'); + R('

\\s*(]*>)\\s*

', '$1'); + R('

(', '$1'); + R('

\\s*(]*>)', '$1'); + R('(]*>)\\s*

', '$1'); + R('(]*>)\\s*
', '$1'); + R('
(\\s*]*>)', '$1'); + + // pre + if (str.indexOf(')((.|\n)*?)', function(m0, m1, m2, m3) + { + return X(m1, '\\\\([\'\"\\\\])', '$1') + X(X(X(m3, '

', '\n'), '

|
', ''), '\\\\([\'\"\\\\])', '$1') + ''; + }); + } + + return R('\n

$', '

'); + }, + + // REMOVE TAGS + stripTags: function(html) + { + var allowed = this.opts.allowedTags; + var tags = /<\/?([a-z][a-z0-9]*)\b[^>]*>/gi; + return html.replace(tags, function ($0, $1) + { + return $.inArray($1.toLowerCase(), allowed) > '-1' ? $0 : ''; + }); + }, + + + savePreCode: function(html) + { + var pre = html.match(/([\w\W]*?)<\/pre>/gi); + if (pre !== null) + { + $.each(pre, $.proxy(function(i,s) + { + var arr = s.match(/([\w\W]*?)<\/pre>/i); + arr[2] = this.encodeEntities(arr[2]); + html = html.replace(s, '' + arr[2] + ''); + }, this)); + } + + return html; + }, + encodeEntities: function(str) + { + str = String(str).replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"'); + return String(str).replace(/&/g, '&').replace(//g, '>').replace(/"/g, '"'); + }, + cleanupPre: function(s) + { + s = s.replace(/
/gi, '\n'); + s = s.replace(/<\/p>/gi, '\n'); + s = s.replace(/<\/div>/gi, '\n'); + + var tmp = this.document.createElement("div"); + tmp.innerHTML = s; + return tmp.textContent||tmp.innerText; + + }, + + + // PASTE CLEANUP + pasteCleanUp: function(html) + { + var parent = this.getParentNode(); + + // clean up pre + if ($(parent).get(0).tagName === 'PRE') + { + html = this.cleanupPre(html); + this.pasteCleanUpInsert(html); + return true; + } + + // remove comments and php tags + html = html.replace(/|<\?(?:php)?[\s\S]*?\?>/gi, ''); + + // remove nbsp + html = html.replace(/( ){2,}/gi, ' '); + + // remove google docs marker + html = html.replace(/([\w\W]*?)<\/b>/gi, "$2"); + + // strip tags + html = this.stripTags(html); + + // prevert + html = html.replace(/<\/td>/gi, '[td]'); + html = html.replace(/ <\/td>/gi, '[td]'); + html = html.replace(/
<\/td>/gi, '[td]'); + html = html.replace(/([\w\W]*?)<\/a>/gi, '[a href="$2"]$4[/a]'); + html = html.replace(/([\w\W]*?)<\/iframe>/gi, '[iframe$1]$2[/iframe]'); + html = html.replace(/([\w\W]*?)<\/video>/gi, '[video$1]$2[/video]'); + html = html.replace(/([\w\W]*?)<\/audio>/gi, '[audio$1]$2[/audio]'); + html = html.replace(/([\w\W]*?)<\/embed>/gi, '[embed$1]$2[/embed]'); + html = html.replace(/([\w\W]*?)<\/object>/gi, '[object$1]$2[/object]'); + html = html.replace(//gi, '[param$1]'); + html = html.replace(//gi, '[img$1$3]'); + + // remove attributes + html = html.replace(/<(\w+)([\w\W]*?)>/gi, '<$1>'); + + // remove empty + html = html.replace(/<[^\/>][^>]*>(\s*|\t*|\n*| |
)<\/[^>]+>/gi, ''); + html = html.replace(/<[^\/>][^>]*>(\s*|\t*|\n*| |
)<\/[^>]+>/gi, ''); + + // revert + html = html.replace(/\[td\]/gi, ' '); + html = html.replace(/\[a href="(.*?)"\]([\w\W]*?)\[\/a\]/gi, '$2'); + html = html.replace(/\[iframe(.*?)\]([\w\W]*?)\[\/iframe\]/gi, '$2'); + html = html.replace(/\[video(.*?)\]([\w\W]*?)\[\/video\]/gi, '$2'); + html = html.replace(/\[audio(.*?)\]([\w\W]*?)\[\/audio\]/gi, '$2'); + html = html.replace(/\[embed(.*?)\]([\w\W]*?)\[\/embed\]/gi, '$2'); + html = html.replace(/\[object(.*?)\]([\w\W]*?)\[\/object\]/gi, '$2'); + html = html.replace(/\[param(.*?)\]/gi, ''); + html = html.replace(/\[img(.*?)\]/gi, ''); + + + // convert div to p + if (this.opts.convertDivs) + { + html = html.replace(/([\w\W]*?)<\/div>/gi, '

$2

'); + } + + // remove span + html = html.replace(/([\w\W]*?)<\/span>/gi, '$1'); + + html = html.replace(/\n{3,}/gi, '\n'); + + // remove dirty p + html = html.replace(/

/gi, '

'); + html = html.replace(/<\/p><\/p>/gi, '

'); + + // FF fix + if (this.browser('mozilla')) + { + html = html.replace(/
$/gi, ''); + } + + this.pasteCleanUpInsert(html); + + }, + + pasteCleanUpInsert: function(html) + { + this.execCommand('inserthtml', html); + + if (this.opts.autoresize === true) + { + $(this.document.body).scrollTop(this.saveScroll); + } + else + { + this.$editor.scrollTop(this.saveScroll); + } + }, + + + // TEXTAREA CODE FORMATTING + formattingRemove: function(html) + { + // save pre + var prebuffer = []; + var pre = html.match(/([\w\W]*?)<\/pre>/gi); + if (pre !== null) + { + $.each(pre, function(i,s) + { + html = html.replace(s, 'prebuffer_' + i); + prebuffer.push(s); + }); + } + + html = html.replace(/\s{2,}/g, ' '); + html = html.replace(/\n/g, ' '); + html = html.replace(/[\t]*/g, ''); + html = html.replace(/\n\s*\n/g, "\n"); + html = html.replace(/^[\s\n]*/g, ''); + html = html.replace(/[\s\n]*$/g, ''); + html = html.replace(/>\s+<'); + + if (prebuffer) + { + $.each(prebuffer, function(i,s) + { + html = html.replace('prebuffer_' + i, s); + }); + + prebuffer = []; + } + + return html; + }, + formattingIndenting: function(html) + { + html = html.replace(/
  • /g, "\t"); + + return html; + }, + formattingEmptyTags: function(html) + { + var etags = ["
    ","
    \\s*
    ","\\s*","
      ","
        ","
      1. ","
        ","","\\s*", " ", "\\s*", " ", "

        \\s*

        ", "

         

        ", "

        \\s*
        \\s*

        ", "
        \\s*
        ", "
        \\s*
        \\s*
        "]; + for (var i = 0; i < etags.length; ++i) + { + var bbb = etags[i]; + html = html.replace(new RegExp(bbb,'gi'), ""); + } + + return html; + }, + formattingAddBefore: function(html) + { + var lb = '\r\n'; + var btags = ["", '', "","', '', '', '', '', '', '', '', '
        ', '
        ', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '']; + for (var i = 0; i < atags.length; ++i) + { + var aaa = atags[i]; + html = html.replace(new RegExp(aaa,'gi'),aaa+lb); + } + + return html; + }, + formatting: function(html) + { + html = this.formattingRemove(html); + + // empty tags + html = this.formattingEmptyTags(html); + + // add formatting before + html = this.formattingAddBefore(html); + + // add formatting after + html = this.formattingAddAfter(html); + + // indenting + html = this.formattingIndenting(html); + + return html; + }, + + // TOGGLE + toggle: function() + { + var html; + + if (this.opts.visual) + { + var height = this.$editor.innerHeight(); + + this.$editor.hide(); + this.$content.hide(); + + html = this.$editor.html(); + //html = $.trim(this.formatting(html)); + + this.$el.height(height).val(html).show().focus(); + + this.setBtnActive('html'); + this.opts.visual = false; + } + else + { + this.$el.hide(); + var html = this.$el.val(); + + //html = this.savePreCode(html); + + // clean up + //html = this.stripTags(html); + + // set code + this.$editor.html(html).show(); + this.$content.show(); + + if (this.$editor.html() === '') + { + this.setCode(this.opts.emptyHtml); + } + + this.$editor.focus(); + + this.setBtnInactive('html'); + this.opts.visual = true; + + this.observeImages(); + this.observeTables(); + } + }, + + // AUTOSAVE + autoSave: function() + { + this.autosaveInterval = setInterval($.proxy(function() + { + $.ajax({ + url: this.opts.autosave, + type: 'post', + data: this.$el.attr('name') + '=' + escape(encodeURIComponent(this.getCode())), + success: $.proxy(function(data) + { + // callback + if (typeof this.opts.autosaveCallback === 'function') + { + this.opts.autosaveCallback(data, this); + } + + }, this) + }); + + + }, this), this.opts.interval*1000); + }, + + // TOOLBAR + buildToolbar: function() + { + if (this.opts.toolbar === false) + { + return false; + } + + this.$toolbar = $('
          ').addClass('redactor_toolbar'); + + if (this.opts.air) + { + $(this.air).append(this.$toolbar); + $('body').append(this.air); + } + else + { + if (this.opts.toolbarExternal === false) + { + this.$box.prepend(this.$toolbar); + } + else + { + $(this.opts.toolbarExternal).html(this.$toolbar); + } + } + + $.each(this.opts.buttons, $.proxy(function(i,key) + { + + if (key !== '|' && typeof this.opts.toolbar[key] !== 'undefined') + { + var s = this.opts.toolbar[key]; + + if (this.opts.fileUpload === false && key === 'file') + { + return true; + } + + this.$toolbar.append($('
        • ').append(this.buildButton(key, s))); + } + + + if (key === '|') + { + this.$toolbar.append($('
        • ')); + } + + }, this)); + + }, + buildButton: function(key, s) + { + var button = $(''); + + if (typeof s.func === 'undefined') + { + button.click($.proxy(function() + { + if ($.inArray(key, this.opts.activeButtons) != -1) + { + this.inactiveAllButtons(); + this.setBtnActive(key); + } + + if (this.browser('mozilla')) + { + this.$editor.focus(); + //this.restoreSelection(); + } + + this.execCommand(s.exec, key); + + }, this)); + } + else if (s.func !== 'show') + { + button.click($.proxy(function(e) { + + this[s.func](e); + + }, this)); + } + + if (typeof s.callback !== 'undefined' && s.callback !== false) + { + button.click($.proxy(function(e) { s.callback(this, e, key); }, this)); + } + + // dropdown + if (key === 'backcolor' || key === 'fontcolor' || typeof(s.dropdown) !== 'undefined') + { + var dropdown = $('').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(), +top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle= +this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=a.handles||(!e(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne", +nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all")this.handles="n,e,s,w,se,sw,ne,nw";var c=this.handles.split(",");this.handles={};for(var d=0;d');/sw|se|ne|nw/.test(f)&&g.css({zIndex:++a.zIndex});"se"==f&&g.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[f]=".ui-resizable-"+f;this.element.append(g)}}this._renderAxis=function(h){h=h||this.element;for(var i in this.handles){if(this.handles[i].constructor== +String)this.handles[i]=e(this.handles[i],this.element).show();if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var j=e(this.handles[i],this.element),l=0;l=/sw|ne|nw|se|n|s/.test(i)?j.outerHeight():j.outerWidth();j=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join("");h.css(j,l);this._proportionallyResize()}e(this.handles[i])}};this._renderAxis(this.element);this._handles=e(".ui-resizable-handle",this.element).disableSelection(); +this._handles.mouseover(function(){if(!b.resizing){if(this.className)var h=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);b.axis=h&&h[1]?h[1]:"se"}});if(a.autoHide){this._handles.hide();e(this.element).addClass("ui-resizable-autohide").hover(function(){if(!a.disabled){e(this).removeClass("ui-resizable-autohide");b._handles.show()}},function(){if(!a.disabled)if(!b.resizing){e(this).addClass("ui-resizable-autohide");b._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy(); +var b=function(c){e(c).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){b(this.element);var a=this.element;a.after(this.originalElement.css({position:a.css("position"),width:a.outerWidth(),height:a.outerHeight(),top:a.css("top"),left:a.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);b(this.originalElement);return this},_mouseCapture:function(b){var a= +false;for(var c in this.handles)if(e(this.handles[c])[0]==b.target)a=true;return!this.options.disabled&&a},_mouseStart:function(b){var a=this.options,c=this.element.position(),d=this.element;this.resizing=true;this.documentScroll={top:e(document).scrollTop(),left:e(document).scrollLeft()};if(d.is(".ui-draggable")||/absolute/.test(d.css("position")))d.css({position:"absolute",top:c.top,left:c.left});e.browser.opera&&/relative/.test(d.css("position"))&&d.css({position:"relative",top:"auto",left:"auto"}); +this._renderProxy();c=m(this.helper.css("left"));var f=m(this.helper.css("top"));if(a.containment){c+=e(a.containment).scrollLeft()||0;f+=e(a.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:c,top:f};this.size=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:c,top:f};this.sizeDiff= +{width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:b.pageX,top:b.pageY};this.aspectRatio=typeof a.aspectRatio=="number"?a.aspectRatio:this.originalSize.width/this.originalSize.height||1;a=e(".ui-resizable-"+this.axis).css("cursor");e("body").css("cursor",a=="auto"?this.axis+"-resize":a);d.addClass("ui-resizable-resizing");this._propagate("start",b);return true},_mouseDrag:function(b){var a=this.helper,c=this.originalMousePosition,d=this._change[this.axis]; +if(!d)return false;c=d.apply(this,[b,b.pageX-c.left||0,b.pageY-c.top||0]);this._updateVirtualBoundaries(b.shiftKey);if(this._aspectRatio||b.shiftKey)c=this._updateRatio(c,b);c=this._respectSize(c,b);this._propagate("resize",b);a.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();this._updateCache(c);this._trigger("resize",b,this.ui());return false}, +_mouseStop:function(b){this.resizing=false;var a=this.options,c=this;if(this._helper){var d=this._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName);d=f&&e.ui.hasScroll(d[0],"left")?0:c.sizeDiff.height;f=f?0:c.sizeDiff.width;f={width:c.helper.width()-f,height:c.helper.height()-d};d=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null;var g=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null;a.animate||this.element.css(e.extend(f, +{top:g,left:d}));c.helper.height(c.size.height);c.helper.width(c.size.width);this._helper&&!a.animate&&this._proportionallyResize()}e("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",b);this._helper&&this.helper.remove();return false},_updateVirtualBoundaries:function(b){var a=this.options,c,d,f;a={minWidth:k(a.minWidth)?a.minWidth:0,maxWidth:k(a.maxWidth)?a.maxWidth:Infinity,minHeight:k(a.minHeight)?a.minHeight:0,maxHeight:k(a.maxHeight)?a.maxHeight: +Infinity};if(this._aspectRatio||b){b=a.minHeight*this.aspectRatio;d=a.minWidth/this.aspectRatio;c=a.maxHeight*this.aspectRatio;f=a.maxWidth/this.aspectRatio;if(b>a.minWidth)a.minWidth=b;if(d>a.minHeight)a.minHeight=d;if(cb.width,h=k(b.height)&&a.minHeight&&a.minHeight>b.height;if(g)b.width=a.minWidth;if(h)b.height=a.minHeight;if(d)b.width=a.maxWidth;if(f)b.height=a.maxHeight;var i=this.originalPosition.left+this.originalSize.width,j=this.position.top+this.size.height,l=/sw|nw|w/.test(c);c=/nw|ne|n/.test(c);if(g&&l)b.left=i-a.minWidth;if(d&&l)b.left=i-a.maxWidth;if(h&&c)b.top=j-a.minHeight;if(f&&c)b.top=j-a.maxHeight;if((a=!b.width&&!b.height)&&!b.left&&b.top)b.top=null;else if(a&&!b.top&&b.left)b.left= +null;return b},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var b=this.helper||this.element,a=0;a');var a=e.browser.msie&&e.browser.version<7,c=a?1:0;a=a?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+ +a,height:this.element.outerHeight()+a,position:"absolute",left:this.elementOffset.left-c+"px",top:this.elementOffset.top-c+"px",zIndex:++b.zIndex});this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(b,a){return{width:this.originalSize.width+a}},w:function(b,a){return{left:this.originalPosition.left+a,width:this.originalSize.width-a}},n:function(b,a,c){return{top:this.originalPosition.top+c,height:this.originalSize.height-c}},s:function(b,a,c){return{height:this.originalSize.height+ +c}},se:function(b,a,c){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,a,c]))},sw:function(b,a,c){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,a,c]))},ne:function(b,a,c){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[b,a,c]))},nw:function(b,a,c){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,a,c]))}},_propagate:function(b,a){e.ui.plugin.call(this,b,[a,this.ui()]); +b!="resize"&&this._trigger(b,a,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});e.extend(e.ui.resizable,{version:"1.8.16"});e.ui.plugin.add("resizable","alsoResize",{start:function(){var b=e(this).data("resizable").options,a=function(c){e(c).each(function(){var d=e(this);d.data("resizable-alsoresize",{width:parseInt(d.width(), +10),height:parseInt(d.height(),10),left:parseInt(d.css("left"),10),top:parseInt(d.css("top"),10),position:d.css("position")})})};if(typeof b.alsoResize=="object"&&!b.alsoResize.parentNode)if(b.alsoResize.length){b.alsoResize=b.alsoResize[0];a(b.alsoResize)}else e.each(b.alsoResize,function(c){a(c)});else a(b.alsoResize)},resize:function(b,a){var c=e(this).data("resizable");b=c.options;var d=c.originalSize,f=c.originalPosition,g={height:c.size.height-d.height||0,width:c.size.width-d.width||0,top:c.position.top- +f.top||0,left:c.position.left-f.left||0},h=function(i,j){e(i).each(function(){var l=e(this),q=e(this).data("resizable-alsoresize"),p={},r=j&&j.length?j:l.parents(a.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(r,function(n,o){if((n=(q[o]||0)+(g[o]||0))&&n>=0)p[o]=n||null});if(e.browser.opera&&/relative/.test(l.css("position"))){c._revertToRelativePosition=true;l.css({position:"absolute",top:"auto",left:"auto"})}l.css(p)})};typeof b.alsoResize=="object"&&!b.alsoResize.nodeType? +e.each(b.alsoResize,function(i,j){h(i,j)}):h(b.alsoResize)},stop:function(){var b=e(this).data("resizable"),a=b.options,c=function(d){e(d).each(function(){var f=e(this);f.css({position:f.data("resizable-alsoresize").position})})};if(b._revertToRelativePosition){b._revertToRelativePosition=false;typeof a.alsoResize=="object"&&!a.alsoResize.nodeType?e.each(a.alsoResize,function(d){c(d)}):c(a.alsoResize)}e(this).removeData("resizable-alsoresize")}});e.ui.plugin.add("resizable","animate",{stop:function(b){var a= +e(this).data("resizable"),c=a.options,d=a._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName),g=f&&e.ui.hasScroll(d[0],"left")?0:a.sizeDiff.height;f={width:a.size.width-(f?0:a.sizeDiff.width),height:a.size.height-g};g=parseInt(a.element.css("left"),10)+(a.position.left-a.originalPosition.left)||null;var h=parseInt(a.element.css("top"),10)+(a.position.top-a.originalPosition.top)||null;a.element.animate(e.extend(f,h&&g?{top:h,left:g}:{}),{duration:c.animateDuration,easing:c.animateEasing, +step:function(){var i={width:parseInt(a.element.css("width"),10),height:parseInt(a.element.css("height"),10),top:parseInt(a.element.css("top"),10),left:parseInt(a.element.css("left"),10)};d&&d.length&&e(d[0]).css({width:i.width,height:i.height});a._updateCache(i);a._propagate("resize",b)}})}});e.ui.plugin.add("resizable","containment",{start:function(){var b=e(this).data("resizable"),a=b.element,c=b.options.containment;if(a=c instanceof e?c.get(0):/parent/.test(c)?a.parent().get(0):c){b.containerElement= +e(a);if(/document/.test(c)||c==document){b.containerOffset={left:0,top:0};b.containerPosition={left:0,top:0};b.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}}else{var d=e(a),f=[];e(["Top","Right","Left","Bottom"]).each(function(i,j){f[i]=m(d.css("padding"+j))});b.containerOffset=d.offset();b.containerPosition=d.position();b.containerSize={height:d.innerHeight()-f[3],width:d.innerWidth()-f[1]};c=b.containerOffset; +var g=b.containerSize.height,h=b.containerSize.width;h=e.ui.hasScroll(a,"left")?a.scrollWidth:h;g=e.ui.hasScroll(a)?a.scrollHeight:g;b.parentData={element:a,left:c.left,top:c.top,width:h,height:g}}}},resize:function(b){var a=e(this).data("resizable"),c=a.options,d=a.containerOffset,f=a.position;b=a._aspectRatio||b.shiftKey;var g={top:0,left:0},h=a.containerElement;if(h[0]!=document&&/static/.test(h.css("position")))g=d;if(f.left<(a._helper?d.left:0)){a.size.width+=a._helper?a.position.left-d.left: +a.position.left-g.left;if(b)a.size.height=a.size.width/c.aspectRatio;a.position.left=c.helper?d.left:0}if(f.top<(a._helper?d.top:0)){a.size.height+=a._helper?a.position.top-d.top:a.position.top;if(b)a.size.width=a.size.height*c.aspectRatio;a.position.top=a._helper?d.top:0}a.offset.left=a.parentData.left+a.position.left;a.offset.top=a.parentData.top+a.position.top;c=Math.abs((a._helper?a.offset.left-g.left:a.offset.left-g.left)+a.sizeDiff.width);d=Math.abs((a._helper?a.offset.top-g.top:a.offset.top- +d.top)+a.sizeDiff.height);f=a.containerElement.get(0)==a.element.parent().get(0);g=/relative|absolute/.test(a.containerElement.css("position"));if(f&&g)c-=a.parentData.left;if(c+a.size.width>=a.parentData.width){a.size.width=a.parentData.width-c;if(b)a.size.height=a.size.width/a.aspectRatio}if(d+a.size.height>=a.parentData.height){a.size.height=a.parentData.height-d;if(b)a.size.width=a.size.height*a.aspectRatio}},stop:function(){var b=e(this).data("resizable"),a=b.options,c=b.containerOffset,d=b.containerPosition, +f=b.containerElement,g=e(b.helper),h=g.offset(),i=g.outerWidth()-b.sizeDiff.width;g=g.outerHeight()-b.sizeDiff.height;b._helper&&!a.animate&&/relative/.test(f.css("position"))&&e(this).css({left:h.left-d.left-c.left,width:i,height:g});b._helper&&!a.animate&&/static/.test(f.css("position"))&&e(this).css({left:h.left-d.left-c.left,width:i,height:g})}});e.ui.plugin.add("resizable","ghost",{start:function(){var b=e(this).data("resizable"),a=b.options,c=b.size;b.ghost=b.originalElement.clone();b.ghost.css({opacity:0.25, +display:"block",position:"relative",height:c.height,width:c.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof a.ghost=="string"?a.ghost:"");b.ghost.appendTo(b.helper)},resize:function(){var b=e(this).data("resizable");b.ghost&&b.ghost.css({position:"relative",height:b.size.height,width:b.size.width})},stop:function(){var b=e(this).data("resizable");b.ghost&&b.helper&&b.helper.get(0).removeChild(b.ghost.get(0))}});e.ui.plugin.add("resizable","grid",{resize:function(){var b= +e(this).data("resizable"),a=b.options,c=b.size,d=b.originalSize,f=b.originalPosition,g=b.axis;a.grid=typeof a.grid=="number"?[a.grid,a.grid]:a.grid;var h=Math.round((c.width-d.width)/(a.grid[0]||1))*(a.grid[0]||1);a=Math.round((c.height-d.height)/(a.grid[1]||1))*(a.grid[1]||1);if(/^(se|s|e)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a}else if(/^(ne)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}else{if(/^(sw)$/.test(g)){b.size.width=d.width+h;b.size.height= +d.height+a}else{b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}b.position.left=f.left-h}}});var m=function(b){return parseInt(b,10)||0},k=function(b){return!isNaN(parseInt(b,10))}})(jQuery); +;/* + * jQuery UI Selectable 1.8.16 + * + * Copyright 2011, 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/Selectables + * + * Depends: + * jquery.ui.core.js + * jquery.ui.mouse.js + * jquery.ui.widget.js + */ +(function(e){e.widget("ui.selectable",e.ui.mouse,{options:{appendTo:"body",autoRefresh:true,distance:0,filter:"*",tolerance:"touch"},_create:function(){var c=this;this.element.addClass("ui-selectable");this.dragged=false;var f;this.refresh=function(){f=e(c.options.filter,c.element[0]);f.each(function(){var d=e(this),b=d.offset();e.data(this,"selectable-item",{element:this,$element:d,left:b.left,top:b.top,right:b.left+d.outerWidth(),bottom:b.top+d.outerHeight(),startselected:false,selected:d.hasClass("ui-selected"), +selecting:d.hasClass("ui-selecting"),unselecting:d.hasClass("ui-unselecting")})})};this.refresh();this.selectees=f.addClass("ui-selectee");this._mouseInit();this.helper=e("
          ")},destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy();return this},_mouseStart:function(c){var f=this;this.opos=[c.pageX, +c.pageY];if(!this.options.disabled){var d=this.options;this.selectees=e(d.filter,this.element[0]);this._trigger("start",c);e(d.appendTo).append(this.helper);this.helper.css({left:c.clientX,top:c.clientY,width:0,height:0});d.autoRefresh&&this.refresh();this.selectees.filter(".ui-selected").each(function(){var b=e.data(this,"selectable-item");b.startselected=true;if(!c.metaKey){b.$element.removeClass("ui-selected");b.selected=false;b.$element.addClass("ui-unselecting");b.unselecting=true;f._trigger("unselecting", +c,{unselecting:b.element})}});e(c.target).parents().andSelf().each(function(){var b=e.data(this,"selectable-item");if(b){var g=!c.metaKey||!b.$element.hasClass("ui-selected");b.$element.removeClass(g?"ui-unselecting":"ui-selected").addClass(g?"ui-selecting":"ui-unselecting");b.unselecting=!g;b.selecting=g;(b.selected=g)?f._trigger("selecting",c,{selecting:b.element}):f._trigger("unselecting",c,{unselecting:b.element});return false}})}},_mouseDrag:function(c){var f=this;this.dragged=true;if(!this.options.disabled){var d= +this.options,b=this.opos[0],g=this.opos[1],h=c.pageX,i=c.pageY;if(b>h){var j=h;h=b;b=j}if(g>i){j=i;i=g;g=j}this.helper.css({left:b,top:g,width:h-b,height:i-g});this.selectees.each(function(){var a=e.data(this,"selectable-item");if(!(!a||a.element==f.element[0])){var k=false;if(d.tolerance=="touch")k=!(a.left>h||a.righti||a.bottomb&&a.rightg&&a.bottom *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1E3},_create:function(){var a=this.options;this.containerCache={};this.element.addClass("ui-sortable"); +this.refresh();this.floating=this.items.length?a.axis==="x"||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var a=this.items.length-1;a>=0;a--)this.items[a].item.removeData("sortable-item");return this},_setOption:function(a,b){if(a=== +"disabled"){this.options[a]=b;this.widget()[b?"addClass":"removeClass"]("ui-sortable-disabled")}else d.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(a,b){if(this.reverting)return false;if(this.options.disabled||this.options.type=="static")return false;this._refreshItems(a);var c=null,e=this;d(a.target).parents().each(function(){if(d.data(this,"sortable-item")==e){c=d(this);return false}});if(d.data(a.target,"sortable-item")==e)c=d(a.target);if(!c)return false;if(this.options.handle&& +!b){var f=false;d(this.options.handle,c).find("*").andSelf().each(function(){if(this==a.target)f=true});if(!f)return false}this.currentItem=c;this._removeCurrentsFromItems();return true},_mouseStart:function(a,b,c){b=this.options;var e=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(a);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top, +left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]}; +this.helper[0]!=this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();b.containment&&this._setContainment();if(b.cursor){if(d("body").css("cursor"))this._storedCursor=d("body").css("cursor");d("body").css("cursor",b.cursor)}if(b.opacity){if(this.helper.css("opacity"))this._storedOpacity=this.helper.css("opacity");this.helper.css("opacity",b.opacity)}if(b.zIndex){if(this.helper.css("zIndex"))this._storedZIndex=this.helper.css("zIndex");this.helper.css("zIndex",b.zIndex)}if(this.scrollParent[0]!= +document&&this.scrollParent[0].tagName!="HTML")this.overflowOffset=this.scrollParent.offset();this._trigger("start",a,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!c)for(c=this.containers.length-1;c>=0;c--)this.containers[c]._trigger("activate",a,e._uiHash(this));if(d.ui.ddmanager)d.ui.ddmanager.current=this;d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(a); +return true},_mouseDrag:function(a){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs)this.lastPositionAbs=this.positionAbs;if(this.options.scroll){var b=this.options,c=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if(this.overflowOffset.top+this.scrollParent[0].offsetHeight-a.pageY=0;b--){c=this.items[b];var e=c.item[0],f=this._intersectsWithPointer(c);if(f)if(e!=this.currentItem[0]&&this.placeholder[f==1?"next":"prev"]()[0]!=e&&!d.ui.contains(this.placeholder[0],e)&&(this.options.type=="semi-dynamic"?!d.ui.contains(this.element[0], +e):true)){this.direction=f==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(c))this._rearrange(a,c);else break;this._trigger("change",a,this._uiHash());break}}this._contactContainers(a);d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);this._trigger("sort",a,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(a,b){if(a){d.ui.ddmanager&&!this.options.dropBehaviour&&d.ui.ddmanager.drop(this,a);if(this.options.revert){var c=this;b=c.placeholder.offset(); +c.reverting=true;d(this.helper).animate({left:b.left-this.offset.parent.left-c.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:b.top-this.offset.parent.top-c.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){c._clear(a)})}else this._clear(a,b);return false}},cancel:function(){var a=this;if(this.dragging){this._mouseUp({target:null});this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"): +this.currentItem.show();for(var b=this.containers.length-1;b>=0;b--){this.containers[b]._trigger("deactivate",null,a._uiHash(this));if(this.containers[b].containerCache.over){this.containers[b]._trigger("out",null,a._uiHash(this));this.containers[b].containerCache.over=0}}}if(this.placeholder){this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove();d.extend(this,{helper:null, +dragging:false,reverting:false,_noFinalSort:null});this.domPosition.prev?d(this.domPosition.prev).after(this.currentItem):d(this.domPosition.parent).prepend(this.currentItem)}return this},serialize:function(a){var b=this._getItemsAsjQuery(a&&a.connected),c=[];a=a||{};d(b).each(function(){var e=(d(a.item||this).attr(a.attribute||"id")||"").match(a.expression||/(.+)[-=_](.+)/);if(e)c.push((a.key||e[1]+"[]")+"="+(a.key&&a.expression?e[1]:e[2]))});!c.length&&a.key&&c.push(a.key+"=");return c.join("&")}, +toArray:function(a){var b=this._getItemsAsjQuery(a&&a.connected),c=[];a=a||{};b.each(function(){c.push(d(a.item||this).attr(a.attribute||"id")||"")});return c},_intersectsWith:function(a){var b=this.positionAbs.left,c=b+this.helperProportions.width,e=this.positionAbs.top,f=e+this.helperProportions.height,g=a.left,h=g+a.width,i=a.top,k=i+a.height,j=this.offset.click.top,l=this.offset.click.left;j=e+j>i&&e+jg&&b+la[this.floating?"width":"height"]?j:g0?"down":"up")},_getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left;return a!=0&&(a>0?"right":"left")},refresh:function(a){this._refreshItems(a);this.refreshPositions();return this},_connectWith:function(){var a=this.options;return a.connectWith.constructor==String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(a){var b=[],c=[],e=this._connectWith(); +if(e&&a)for(a=e.length-1;a>=0;a--)for(var f=d(e[a]),g=f.length-1;g>=0;g--){var h=d.data(f[g],"sortable");if(h&&h!=this&&!h.options.disabled)c.push([d.isFunction(h.options.items)?h.options.items.call(h.element):d(h.options.items,h.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),h])}c.push([d.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):d(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), +this]);for(a=c.length-1;a>=0;a--)c[a][0].each(function(){b.push(this)});return d(b)},_removeCurrentsFromItems:function(){for(var a=this.currentItem.find(":data(sortable-item)"),b=0;b=0;f--)for(var g=d(e[f]),h=g.length-1;h>=0;h--){var i=d.data(g[h],"sortable");if(i&&i!=this&&!i.options.disabled){c.push([d.isFunction(i.options.items)?i.options.items.call(i.element[0],a,{item:this.currentItem}):d(i.options.items,i.element),i]);this.containers.push(i)}}for(f=c.length-1;f>=0;f--){a=c[f][1];e=c[f][0];h=0;for(g=e.length;h=0;b--){var c=this.items[b];if(!(c.instance!=this.currentContainer&&this.currentContainer&&c.item[0]!=this.currentItem[0])){var e=this.options.toleranceElement?d(this.options.toleranceElement,c.item):c.item;if(!a){c.width=e.outerWidth();c.height=e.outerHeight()}e=e.offset();c.left=e.left;c.top=e.top}}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(b= +this.containers.length-1;b>=0;b--){e=this.containers[b].element.offset();this.containers[b].containerCache.left=e.left;this.containers[b].containerCache.top=e.top;this.containers[b].containerCache.width=this.containers[b].element.outerWidth();this.containers[b].containerCache.height=this.containers[b].element.outerHeight()}return this},_createPlaceholder:function(a){var b=a||this,c=b.options;if(!c.placeholder||c.placeholder.constructor==String){var e=c.placeholder;c.placeholder={element:function(){var f= +d(document.createElement(b.currentItem[0].nodeName)).addClass(e||b.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!e)f.style.visibility="hidden";return f},update:function(f,g){if(!(e&&!c.forcePlaceholderSize)){g.height()||g.height(b.currentItem.innerHeight()-parseInt(b.currentItem.css("paddingTop")||0,10)-parseInt(b.currentItem.css("paddingBottom")||0,10));g.width()||g.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css("paddingLeft")||0,10)-parseInt(b.currentItem.css("paddingRight")|| +0,10))}}}}b.placeholder=d(c.placeholder.element.call(b.element,b.currentItem));b.currentItem.after(b.placeholder);c.placeholder.update(b,b.placeholder)},_contactContainers:function(a){for(var b=null,c=null,e=this.containers.length-1;e>=0;e--)if(!d.ui.contains(this.currentItem[0],this.containers[e].element[0]))if(this._intersectsWith(this.containers[e].containerCache)){if(!(b&&d.ui.contains(this.containers[e].element[0],b.element[0]))){b=this.containers[e];c=e}}else if(this.containers[e].containerCache.over){this.containers[e]._trigger("out", +a,this._uiHash(this));this.containers[e].containerCache.over=0}if(b)if(this.containers.length===1){this.containers[c]._trigger("over",a,this._uiHash(this));this.containers[c].containerCache.over=1}else if(this.currentContainer!=this.containers[c]){b=1E4;e=null;for(var f=this.positionAbs[this.containers[c].floating?"left":"top"],g=this.items.length-1;g>=0;g--)if(d.ui.contains(this.containers[c].element[0],this.items[g].item[0])){var h=this.items[g][this.containers[c].floating?"left":"top"];if(Math.abs(h- +f)this.containment[2])f=this.containment[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>this.containment[3])g=this.containment[3]+this.offset.click.top}if(b.grid){g=this.originalPageY+Math.round((g- +this.originalPageY)/b.grid[1])*b.grid[1];g=this.containment?!(g-this.offset.click.topthis.containment[3])?g:!(g-this.offset.click.topthis.containment[2])?f:!(f-this.offset.click.left=0;e--)if(d.ui.contains(this.containers[e].element[0],this.currentItem[0])&&!b){c.push(function(f){return function(g){f._trigger("receive",g,this._uiHash(this))}}.call(this,this.containers[e]));c.push(function(f){return function(g){f._trigger("update",g,this._uiHash(this))}}.call(this,this.containers[e]))}}for(e=this.containers.length-1;e>=0;e--){b||c.push(function(f){return function(g){f._trigger("deactivate",g,this._uiHash(this))}}.call(this, +this.containers[e]));if(this.containers[e].containerCache.over){c.push(function(f){return function(g){f._trigger("out",g,this._uiHash(this))}}.call(this,this.containers[e]));this.containers[e].containerCache.over=0}}this._storedCursor&&d("body").css("cursor",this._storedCursor);this._storedOpacity&&this.helper.css("opacity",this._storedOpacity);if(this._storedZIndex)this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex);this.dragging=false;if(this.cancelHelperRemoval){if(!b){this._trigger("beforeStop", +a,this._uiHash());for(e=0;e li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var a=this,b=a.options;a.running=0;a.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix"); +a.headers=a.element.find(b.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){b.disabled||c(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){b.disabled||c(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){b.disabled||c(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){b.disabled||c(this).removeClass("ui-state-focus")});a.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom"); +if(b.navigation){var d=a.element.find("a").filter(b.navigationFilter).eq(0);if(d.length){var h=d.closest(".ui-accordion-header");a.active=h.length?h:d.closest(".ui-accordion-content").prev()}}a.active=a._findActive(a.active||b.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");a.active.next().addClass("ui-accordion-content-active");a._createIcons();a.resize();a.element.attr("role","tablist");a.headers.attr("role","tab").bind("keydown.accordion", +function(f){return a._keydown(f)}).next().attr("role","tabpanel");a.headers.not(a.active||"").attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).next().hide();a.active.length?a.active.attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}):a.headers.eq(0).attr("tabIndex",0);c.browser.safari||a.headers.find("a").attr("tabIndex",-1);b.event&&a.headers.bind(b.event.split(" ").join(".accordion ")+".accordion",function(f){a._clickHandler.call(a,f,this);f.preventDefault()})},_createIcons:function(){var a= +this.options;if(a.icons){c("").addClass("ui-icon "+a.icons.header).prependTo(this.headers);this.active.children(".ui-icon").toggleClass(a.icons.header).toggleClass(a.icons.headerSelected);this.element.addClass("ui-accordion-icons")}},_destroyIcons:function(){this.headers.children(".ui-icon").remove();this.element.removeClass("ui-accordion-icons")},destroy:function(){var a=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("tabIndex"); +this.headers.find("a").removeAttr("tabIndex");this._destroyIcons();var b=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");if(a.autoHeight||a.fillHeight)b.css("height","");return c.Widget.prototype.destroy.call(this)},_setOption:function(a,b){c.Widget.prototype._setOption.apply(this,arguments);a=="active"&&this.activate(b);if(a=="icons"){this._destroyIcons(); +b&&this._createIcons()}if(a=="disabled")this.headers.add(this.headers.next())[b?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")},_keydown:function(a){if(!(this.options.disabled||a.altKey||a.ctrlKey)){var b=c.ui.keyCode,d=this.headers.length,h=this.headers.index(a.target),f=false;switch(a.keyCode){case b.RIGHT:case b.DOWN:f=this.headers[(h+1)%d];break;case b.LEFT:case b.UP:f=this.headers[(h-1+d)%d];break;case b.SPACE:case b.ENTER:this._clickHandler({target:a.target},a.target); +a.preventDefault()}if(f){c(a.target).attr("tabIndex",-1);c(f).attr("tabIndex",0);f.focus();return false}return true}},resize:function(){var a=this.options,b;if(a.fillSpace){if(c.browser.msie){var d=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}b=this.element.parent().height();c.browser.msie&&this.element.parent().css("overflow",d);this.headers.each(function(){b-=c(this).outerHeight(true)});this.headers.next().each(function(){c(this).height(Math.max(0,b-c(this).innerHeight()+ +c(this).height()))}).css("overflow","auto")}else if(a.autoHeight){b=0;this.headers.next().each(function(){b=Math.max(b,c(this).height("").height())}).height(b)}return this},activate:function(a){this.options.active=a;a=this._findActive(a)[0];this._clickHandler({target:a},a);return this},_findActive:function(a){return a?typeof a==="number"?this.headers.filter(":eq("+a+")"):this.headers.not(this.headers.not(a)):a===false?c([]):this.headers.filter(":eq(0)")},_clickHandler:function(a,b){var d=this.options; +if(!d.disabled)if(a.target){a=c(a.currentTarget||b);b=a[0]===this.active[0];d.active=d.collapsible&&b?false:this.headers.index(a);if(!(this.running||!d.collapsible&&b)){var h=this.active;j=a.next();g=this.active.next();e={options:d,newHeader:b&&d.collapsible?c([]):a,oldHeader:this.active,newContent:b&&d.collapsible?c([]):j,oldContent:g};var f=this.headers.index(this.active[0])>this.headers.index(a[0]);this.active=b?c([]):a;this._toggle(j,g,e,b,f);h.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header); +if(!b){a.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected);a.next().addClass("ui-accordion-content-active")}}}else if(d.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");var g=this.active.next(), +e={options:d,newHeader:c([]),oldHeader:d.active,newContent:c([]),oldContent:g},j=this.active=c([]);this._toggle(j,g,e)}},_toggle:function(a,b,d,h,f){var g=this,e=g.options;g.toShow=a;g.toHide=b;g.data=d;var j=function(){if(g)return g._completed.apply(g,arguments)};g._trigger("changestart",null,g.data);g.running=b.size()===0?a.size():b.size();if(e.animated){d={};d=e.collapsible&&h?{toShow:c([]),toHide:b,complete:j,down:f,autoHeight:e.autoHeight||e.fillSpace}:{toShow:a,toHide:b,complete:j,down:f,autoHeight:e.autoHeight|| +e.fillSpace};if(!e.proxied)e.proxied=e.animated;if(!e.proxiedDuration)e.proxiedDuration=e.duration;e.animated=c.isFunction(e.proxied)?e.proxied(d):e.proxied;e.duration=c.isFunction(e.proxiedDuration)?e.proxiedDuration(d):e.proxiedDuration;h=c.ui.accordion.animations;var i=e.duration,k=e.animated;if(k&&!h[k]&&!c.easing[k])k="slide";h[k]||(h[k]=function(l){this.slide(l,{easing:k,duration:i||700})});h[k](d)}else{if(e.collapsible&&h)a.toggle();else{b.hide();a.show()}j(true)}b.prev().attr({"aria-expanded":"false", +"aria-selected":"false",tabIndex:-1}).blur();a.prev().attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}).focus()},_completed:function(a){this.running=a?0:--this.running;if(!this.running){this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""});this.toHide.removeClass("ui-accordion-content-active");if(this.toHide.length)this.toHide.parent()[0].className=this.toHide.parent()[0].className;this._trigger("change",null,this.data)}}});c.extend(c.ui.accordion,{version:"1.8.16", +animations:{slide:function(a,b){a=c.extend({easing:"swing",duration:300},a,b);if(a.toHide.size())if(a.toShow.size()){var d=a.toShow.css("overflow"),h=0,f={},g={},e;b=a.toShow;e=b[0].style.width;b.width(parseInt(b.parent().width(),10)-parseInt(b.css("paddingLeft"),10)-parseInt(b.css("paddingRight"),10)-(parseInt(b.css("borderLeftWidth"),10)||0)-(parseInt(b.css("borderRightWidth"),10)||0));c.each(["height","paddingTop","paddingBottom"],function(j,i){g[i]="hide";j=(""+c.css(a.toShow[0],i)).match(/^([\d+-.]+)(.*)$/); +f[i]={value:j[1],unit:j[2]||"px"}});a.toShow.css({height:0,overflow:"hidden"}).show();a.toHide.filter(":hidden").each(a.complete).end().filter(":visible").animate(g,{step:function(j,i){if(i.prop=="height")h=i.end-i.start===0?0:(i.now-i.start)/(i.end-i.start);a.toShow[0].style[i.prop]=h*f[i.prop].value+f[i.prop].unit},duration:a.duration,easing:a.easing,complete:function(){a.autoHeight||a.toShow.css("height","");a.toShow.css({width:e,overflow:d});a.complete()}})}else a.toHide.animate({height:"hide", +paddingTop:"hide",paddingBottom:"hide"},a);else a.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},a)},bounceslide:function(a){this.slide(a,{easing:a.down?"easeOutBounce":"swing",duration:a.down?1E3:200})}}})})(jQuery); +;/* + * jQuery UI Autocomplete 1.8.16 + * + * Copyright 2011, 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 + * + * Depends: + * jquery.ui.core.js + * jquery.ui.widget.js + * jquery.ui.position.js + */ +(function(d){var e=0;d.widget("ui.autocomplete",{options:{appendTo:"body",autoFocus:false,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var a=this,b=this.element[0].ownerDocument,g;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(c){if(!(a.options.disabled||a.element.propAttr("readOnly"))){g= +false;var f=d.ui.keyCode;switch(c.keyCode){case f.PAGE_UP:a._move("previousPage",c);break;case f.PAGE_DOWN:a._move("nextPage",c);break;case f.UP:a._move("previous",c);c.preventDefault();break;case f.DOWN:a._move("next",c);c.preventDefault();break;case f.ENTER:case f.NUMPAD_ENTER:if(a.menu.active){g=true;c.preventDefault()}case f.TAB:if(!a.menu.active)return;a.menu.select(c);break;case f.ESCAPE:a.element.val(a.term);a.close(c);break;default:clearTimeout(a.searching);a.searching=setTimeout(function(){if(a.term!= +a.element.val()){a.selectedItem=null;a.search(null,c)}},a.options.delay);break}}}).bind("keypress.autocomplete",function(c){if(g){g=false;c.preventDefault()}}).bind("focus.autocomplete",function(){if(!a.options.disabled){a.selectedItem=null;a.previous=a.element.val()}}).bind("blur.autocomplete",function(c){if(!a.options.disabled){clearTimeout(a.searching);a.closing=setTimeout(function(){a.close(c);a._change(c)},150)}});this._initSource();this.response=function(){return a._response.apply(a,arguments)}; +this.menu=d("
            ").addClass("ui-autocomplete").appendTo(d(this.options.appendTo||"body",b)[0]).mousedown(function(c){var f=a.menu.element[0];d(c.target).closest(".ui-menu-item").length||setTimeout(function(){d(document).one("mousedown",function(h){h.target!==a.element[0]&&h.target!==f&&!d.ui.contains(f,h.target)&&a.close()})},1);setTimeout(function(){clearTimeout(a.closing)},13)}).menu({focus:function(c,f){f=f.item.data("item.autocomplete");false!==a._trigger("focus",c,{item:f})&&/^key/.test(c.originalEvent.type)&& +a.element.val(f.value)},selected:function(c,f){var h=f.item.data("item.autocomplete"),i=a.previous;if(a.element[0]!==b.activeElement){a.element.focus();a.previous=i;setTimeout(function(){a.previous=i;a.selectedItem=h},1)}false!==a._trigger("select",c,{item:h})&&a.element.val(h.value);a.term=a.element.val();a.close(c);a.selectedItem=h},blur:function(){a.menu.element.is(":visible")&&a.element.val()!==a.term&&a.element.val(a.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu"); +d.fn.bgiframe&&this.menu.element.bgiframe()},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup");this.menu.element.remove();d.Widget.prototype.destroy.call(this)},_setOption:function(a,b){d.Widget.prototype._setOption.apply(this,arguments);a==="source"&&this._initSource();if(a==="appendTo")this.menu.element.appendTo(d(b||"body",this.element[0].ownerDocument)[0]);a==="disabled"&& +b&&this.xhr&&this.xhr.abort()},_initSource:function(){var a=this,b,g;if(d.isArray(this.options.source)){b=this.options.source;this.source=function(c,f){f(d.ui.autocomplete.filter(b,c.term))}}else if(typeof this.options.source==="string"){g=this.options.source;this.source=function(c,f){a.xhr&&a.xhr.abort();a.xhr=d.ajax({url:g,data:c,dataType:"json",autocompleteRequest:++e,success:function(h){this.autocompleteRequest===e&&f(h)},error:function(){this.autocompleteRequest===e&&f([])}})}}else this.source= +this.options.source},search:function(a,b){a=a!=null?a:this.element.val();this.term=this.element.val();if(a.length").data("item.autocomplete",b).append(d("").text(b.label)).appendTo(a)},_move:function(a,b){if(this.menu.element.is(":visible"))if(this.menu.first()&&/^previous/.test(a)||this.menu.last()&&/^next/.test(a)){this.element.val(this.term);this.menu.deactivate()}else this.menu[a](b);else this.search(null,b)},widget:function(){return this.menu.element}});d.extend(d.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, +"\\$&")},filter:function(a,b){var g=new RegExp(d.ui.autocomplete.escapeRegex(b),"i");return d.grep(a,function(c){return g.test(c.label||c.value||c)})}})})(jQuery); +(function(d){d.widget("ui.menu",{_create:function(){var e=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(a){if(d(a.target).closest(".ui-menu-item a").length){a.preventDefault();e.select(a)}});this.refresh()},refresh:function(){var e=this;this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem").children("a").addClass("ui-corner-all").attr("tabindex", +-1).mouseenter(function(a){e.activate(a,d(this).parent())}).mouseleave(function(){e.deactivate()})},activate:function(e,a){this.deactivate();if(this.hasScroll()){var b=a.offset().top-this.element.offset().top,g=this.element.scrollTop(),c=this.element.height();if(b<0)this.element.scrollTop(g+b);else b>=c&&this.element.scrollTop(g+b-c+a.height())}this.active=a.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",e,{item:a})},deactivate:function(){if(this.active){this.active.children("a").removeClass("ui-state-hover").removeAttr("id"); +this._trigger("blur");this.active=null}},next:function(e){this.move("next",".ui-menu-item:first",e)},previous:function(e){this.move("prev",".ui-menu-item:last",e)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(e,a,b){if(this.active){e=this.active[e+"All"](".ui-menu-item").eq(0);e.length?this.activate(b,e):this.activate(b,this.element.children(a))}else this.activate(b, +this.element.children(a))},nextPage:function(e){if(this.hasScroll())if(!this.active||this.last())this.activate(e,this.element.children(".ui-menu-item:first"));else{var a=this.active.offset().top,b=this.element.height(),g=this.element.children(".ui-menu-item").filter(function(){var c=d(this).offset().top-a-b+d(this).height();return c<10&&c>-10});g.length||(g=this.element.children(".ui-menu-item:last"));this.activate(e,g)}else this.activate(e,this.element.children(".ui-menu-item").filter(!this.active|| +this.last()?":first":":last"))},previousPage:function(e){if(this.hasScroll())if(!this.active||this.first())this.activate(e,this.element.children(".ui-menu-item:last"));else{var a=this.active.offset().top,b=this.element.height();result=this.element.children(".ui-menu-item").filter(function(){var g=d(this).offset().top-a+b-d(this).height();return g<10&&g>-10});result.length||(result=this.element.children(".ui-menu-item:first"));this.activate(e,result)}else this.activate(e,this.element.children(".ui-menu-item").filter(!this.active|| +this.first()?":last":":first"))},hasScroll:function(){return this.element.height()").addClass("ui-button-text").html(this.options.label).appendTo(a.empty()).text(),e=this.options.icons,f=e.primary&&e.secondary,d=[];if(e.primary||e.secondary){if(this.options.text)d.push("ui-button-text-icon"+(f?"s":e.primary?"-primary":"-secondary"));e.primary&&a.prepend("");e.secondary&&a.append("");if(!this.options.text){d.push(f?"ui-button-icons-only": +"ui-button-icon-only");this.hasTitle||a.attr("title",c)}}else d.push("ui-button-text-only");a.addClass(d.join(" "))}}});b.widget("ui.buttonset",{options:{items:":button, :submit, :reset, :checkbox, :radio, a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(a,c){a==="disabled"&&this.buttons.button("option",a,c);b.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){var a=this.element.css("direction")=== +"ltr";this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return b(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(a?"ui-corner-left":"ui-corner-right").end().filter(":last").addClass(a?"ui-corner-right":"ui-corner-left").end().end()},destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return b(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy"); +b.Widget.prototype.destroy.call(this)}})})(jQuery); +;/* + * jQuery UI Dialog 1.8.16 + * + * Copyright 2011, 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 + * + * Depends: + * jquery.ui.core.js + * jquery.ui.widget.js + * jquery.ui.button.js + * jquery.ui.draggable.js + * jquery.ui.mouse.js + * jquery.ui.position.js + * jquery.ui.resizable.js + */ +(function(c,l){var m={buttons:true,height:true,maxHeight:true,maxWidth:true,minHeight:true,minWidth:true,width:true},n={maxHeight:true,maxWidth:true,minHeight:true,minWidth:true},o=c.attrFn||{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true,click:true};c.widget("ui.dialog",{options:{autoOpen:true,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false, +position:{my:"center",at:"center",collision:"fit",using:function(a){var b=c(this).css(a).offset().top;b<0&&c(this).css("top",a.top-b)}},resizable:true,show:null,stack:true,title:"",width:300,zIndex:1E3},_create:function(){this.originalTitle=this.element.attr("title");if(typeof this.originalTitle!=="string")this.originalTitle="";this.options.title=this.options.title||this.originalTitle;var a=this,b=a.options,d=b.title||" ",e=c.ui.dialog.getTitleId(a.element),g=(a.uiDialog=c("
            ")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+ +b.dialogClass).css({zIndex:b.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(i){if(b.closeOnEscape&&!i.isDefaultPrevented()&&i.keyCode&&i.keyCode===c.ui.keyCode.ESCAPE){a.close(i);i.preventDefault()}}).attr({role:"dialog","aria-labelledby":e}).mousedown(function(i){a.moveToTop(false,i)});a.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(g);var f=(a.uiDialogTitlebar=c("
            ")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(g), +h=c('').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){h.addClass("ui-state-hover")},function(){h.removeClass("ui-state-hover")}).focus(function(){h.addClass("ui-state-focus")}).blur(function(){h.removeClass("ui-state-focus")}).click(function(i){a.close(i);return false}).appendTo(f);(a.uiDialogTitlebarCloseText=c("")).addClass("ui-icon ui-icon-closethick").text(b.closeText).appendTo(h);c("").addClass("ui-dialog-title").attr("id", +e).html(d).prependTo(f);if(c.isFunction(b.beforeclose)&&!c.isFunction(b.beforeClose))b.beforeClose=b.beforeclose;f.find("*").add(f).disableSelection();b.draggable&&c.fn.draggable&&a._makeDraggable();b.resizable&&c.fn.resizable&&a._makeResizable();a._createButtons(b.buttons);a._isOpen=false;c.fn.bgiframe&&g.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){var a=this;a.overlay&&a.overlay.destroy();a.uiDialog.hide();a.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"); +a.uiDialog.remove();a.originalTitle&&a.element.attr("title",a.originalTitle);return a},widget:function(){return this.uiDialog},close:function(a){var b=this,d,e;if(false!==b._trigger("beforeClose",a)){b.overlay&&b.overlay.destroy();b.uiDialog.unbind("keypress.ui-dialog");b._isOpen=false;if(b.options.hide)b.uiDialog.hide(b.options.hide,function(){b._trigger("close",a)});else{b.uiDialog.hide();b._trigger("close",a)}c.ui.dialog.overlay.resize();if(b.options.modal){d=0;c(".ui-dialog").each(function(){if(this!== +b.uiDialog[0]){e=c(this).css("z-index");isNaN(e)||(d=Math.max(d,e))}});c.ui.dialog.maxZ=d}return b}},isOpen:function(){return this._isOpen},moveToTop:function(a,b){var d=this,e=d.options;if(e.modal&&!a||!e.stack&&!e.modal)return d._trigger("focus",b);if(e.zIndex>c.ui.dialog.maxZ)c.ui.dialog.maxZ=e.zIndex;if(d.overlay){c.ui.dialog.maxZ+=1;d.overlay.$el.css("z-index",c.ui.dialog.overlay.maxZ=c.ui.dialog.maxZ)}a={scrollTop:d.element.scrollTop(),scrollLeft:d.element.scrollLeft()};c.ui.dialog.maxZ+=1; +d.uiDialog.css("z-index",c.ui.dialog.maxZ);d.element.attr(a);d._trigger("focus",b);return d},open:function(){if(!this._isOpen){var a=this,b=a.options,d=a.uiDialog;a.overlay=b.modal?new c.ui.dialog.overlay(a):null;a._size();a._position(b.position);d.show(b.show);a.moveToTop(true);b.modal&&d.bind("keypress.ui-dialog",function(e){if(e.keyCode===c.ui.keyCode.TAB){var g=c(":tabbable",this),f=g.filter(":first");g=g.filter(":last");if(e.target===g[0]&&!e.shiftKey){f.focus(1);return false}else if(e.target=== +f[0]&&e.shiftKey){g.focus(1);return false}}});c(a.element.find(":tabbable").get().concat(d.find(".ui-dialog-buttonpane :tabbable").get().concat(d.get()))).eq(0).focus();a._isOpen=true;a._trigger("open");return a}},_createButtons:function(a){var b=this,d=false,e=c("
            ").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),g=c("
            ").addClass("ui-dialog-buttonset").appendTo(e);b.uiDialog.find(".ui-dialog-buttonpane").remove();typeof a==="object"&&a!==null&&c.each(a, +function(){return!(d=true)});if(d){c.each(a,function(f,h){h=c.isFunction(h)?{click:h,text:f}:h;var i=c('').click(function(){h.click.apply(b.element[0],arguments)}).appendTo(g);c.each(h,function(j,k){if(j!=="click")j in o?i[j](k):i.attr(j,k)});c.fn.button&&i.button()});e.appendTo(b.uiDialog)}},_makeDraggable:function(){function a(f){return{position:f.position,offset:f.offset}}var b=this,d=b.options,e=c(document),g;b.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close", +handle:".ui-dialog-titlebar",containment:"document",start:function(f,h){g=d.height==="auto"?"auto":c(this).height();c(this).height(c(this).height()).addClass("ui-dialog-dragging");b._trigger("dragStart",f,a(h))},drag:function(f,h){b._trigger("drag",f,a(h))},stop:function(f,h){d.position=[h.position.left-e.scrollLeft(),h.position.top-e.scrollTop()];c(this).removeClass("ui-dialog-dragging").height(g);b._trigger("dragStop",f,a(h));c.ui.dialog.overlay.resize()}})},_makeResizable:function(a){function b(f){return{originalPosition:f.originalPosition, +originalSize:f.originalSize,position:f.position,size:f.size}}a=a===l?this.options.resizable:a;var d=this,e=d.options,g=d.uiDialog.css("position");a=typeof a==="string"?a:"n,e,s,w,se,sw,ne,nw";d.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:d.element,maxWidth:e.maxWidth,maxHeight:e.maxHeight,minWidth:e.minWidth,minHeight:d._minHeight(),handles:a,start:function(f,h){c(this).addClass("ui-dialog-resizing");d._trigger("resizeStart",f,b(h))},resize:function(f,h){d._trigger("resize", +f,b(h))},stop:function(f,h){c(this).removeClass("ui-dialog-resizing");e.height=c(this).height();e.width=c(this).width();d._trigger("resizeStop",f,b(h));c.ui.dialog.overlay.resize()}}).css("position",g).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var a=this.options;return a.height==="auto"?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(a){var b=[],d=[0,0],e;if(a){if(typeof a==="string"||typeof a==="object"&&"0"in a){b=a.split?a.split(" "): +[a[0],a[1]];if(b.length===1)b[1]=b[0];c.each(["left","top"],function(g,f){if(+b[g]===b[g]){d[g]=b[g];b[g]=f}});a={my:b.join(" "),at:b.join(" "),offset:d.join(" ")}}a=c.extend({},c.ui.dialog.prototype.options.position,a)}else a=c.ui.dialog.prototype.options.position;(e=this.uiDialog.is(":visible"))||this.uiDialog.show();this.uiDialog.css({top:0,left:0}).position(c.extend({of:window},a));e||this.uiDialog.hide()},_setOptions:function(a){var b=this,d={},e=false;c.each(a,function(g,f){b._setOption(g,f); +if(g in m)e=true;if(g in n)d[g]=f});e&&this._size();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",d)},_setOption:function(a,b){var d=this,e=d.uiDialog;switch(a){case "beforeclose":a="beforeClose";break;case "buttons":d._createButtons(b);break;case "closeText":d.uiDialogTitlebarCloseText.text(""+b);break;case "dialogClass":e.removeClass(d.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+b);break;case "disabled":b?e.addClass("ui-dialog-disabled"): +e.removeClass("ui-dialog-disabled");break;case "draggable":var g=e.is(":data(draggable)");g&&!b&&e.draggable("destroy");!g&&b&&d._makeDraggable();break;case "position":d._position(b);break;case "resizable":(g=e.is(":data(resizable)"))&&!b&&e.resizable("destroy");g&&typeof b==="string"&&e.resizable("option","handles",b);!g&&b!==false&&d._makeResizable(b);break;case "title":c(".ui-dialog-title",d.uiDialogTitlebar).html(""+(b||" "));break}c.Widget.prototype._setOption.apply(d,arguments)},_size:function(){var a= +this.options,b,d,e=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0});if(a.minWidth>a.width)a.width=a.minWidth;b=this.uiDialog.css({height:"auto",width:a.width}).height();d=Math.max(0,a.minHeight-b);if(a.height==="auto")if(c.support.minHeight)this.element.css({minHeight:d,height:"auto"});else{this.uiDialog.show();a=this.element.css("height","auto").height();e||this.uiDialog.hide();this.element.height(Math.max(a,d))}else this.element.height(Math.max(a.height- +b,0));this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}});c.extend(c.ui.dialog,{version:"1.8.16",uuid:0,maxZ:0,getTitleId:function(a){a=a.attr("id");if(!a){this.uuid+=1;a=this.uuid}return"ui-dialog-title-"+a},overlay:function(a){this.$el=c.ui.dialog.overlay.create(a)}});c.extend(c.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:c.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(a){return a+".dialog-overlay"}).join(" "), +create:function(a){if(this.instances.length===0){setTimeout(function(){c.ui.dialog.overlay.instances.length&&c(document).bind(c.ui.dialog.overlay.events,function(d){if(c(d.target).zIndex()").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),height:this.height()});c.fn.bgiframe&&b.bgiframe();this.instances.push(b);return b},destroy:function(a){var b=c.inArray(a,this.instances);b!=-1&&this.oldInstances.push(this.instances.splice(b,1)[0]);this.instances.length===0&&c([document,window]).unbind(".dialog-overlay");a.remove();var d=0;c.each(this.instances,function(){d=Math.max(d,this.css("z-index"))});this.maxZ=d},height:function(){var a,b;if(c.browser.msie&& +c.browser.version<7){a=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);b=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);return a").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+(b.range==="min"||b.range==="max"?" ui-slider-range-"+b.range:""))}for(var j=c.length;j"); +this.handles=c.add(d(e.join("")).appendTo(a.element));this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(g){g.preventDefault()}).hover(function(){b.disabled||d(this).addClass("ui-state-hover")},function(){d(this).removeClass("ui-state-hover")}).focus(function(){if(b.disabled)d(this).blur();else{d(".ui-slider .ui-state-focus").removeClass("ui-state-focus");d(this).addClass("ui-state-focus")}}).blur(function(){d(this).removeClass("ui-state-focus")});this.handles.each(function(g){d(this).data("index.ui-slider-handle", +g)});this.handles.keydown(function(g){var k=true,l=d(this).data("index.ui-slider-handle"),i,h,m;if(!a.options.disabled){switch(g.keyCode){case d.ui.keyCode.HOME:case d.ui.keyCode.END:case d.ui.keyCode.PAGE_UP:case d.ui.keyCode.PAGE_DOWN:case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:k=false;if(!a._keySliding){a._keySliding=true;d(this).addClass("ui-state-active");i=a._start(g,l);if(i===false)return}break}m=a.options.step;i=a.options.values&&a.options.values.length? +(h=a.values(l)):(h=a.value());switch(g.keyCode){case d.ui.keyCode.HOME:h=a._valueMin();break;case d.ui.keyCode.END:h=a._valueMax();break;case d.ui.keyCode.PAGE_UP:h=a._trimAlignValue(i+(a._valueMax()-a._valueMin())/5);break;case d.ui.keyCode.PAGE_DOWN:h=a._trimAlignValue(i-(a._valueMax()-a._valueMin())/5);break;case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:if(i===a._valueMax())return;h=a._trimAlignValue(i+m);break;case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:if(i===a._valueMin())return;h=a._trimAlignValue(i- +m);break}a._slide(g,l,h);return k}}).keyup(function(g){var k=d(this).data("index.ui-slider-handle");if(a._keySliding){a._keySliding=false;a._stop(g,k);a._change(g,k);d(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy(); +return this},_mouseCapture:function(a){var b=this.options,c,f,e,j,g;if(b.disabled)return false;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();c=this._normValueFromMouse({x:a.pageX,y:a.pageY});f=this._valueMax()-this._valueMin()+1;j=this;this.handles.each(function(k){var l=Math.abs(c-j.values(k));if(f>l){f=l;e=d(this);g=k}});if(b.range===true&&this.values(1)===b.min){g+=1;e=d(this.handles[g])}if(this._start(a,g)===false)return false; +this._mouseSliding=true;j._handleIndex=g;e.addClass("ui-state-active").focus();b=e.offset();this._clickOffset=!d(a.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:a.pageX-b.left-e.width()/2,top:a.pageY-b.top-e.height()/2-(parseInt(e.css("borderTopWidth"),10)||0)-(parseInt(e.css("borderBottomWidth"),10)||0)+(parseInt(e.css("marginTop"),10)||0)};this.handles.hasClass("ui-state-hover")||this._slide(a,g,c);return this._animateOff=true},_mouseStart:function(){return true},_mouseDrag:function(a){var b= +this._normValueFromMouse({x:a.pageX,y:a.pageY});this._slide(a,this._handleIndex,b);return false},_mouseStop:function(a){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(a,this._handleIndex);this._change(a,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=false},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(a){var b;if(this.orientation==="horizontal"){b= +this.elementSize.width;a=a.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{b=this.elementSize.height;a=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}b=a/b;if(b>1)b=1;if(b<0)b=0;if(this.orientation==="vertical")b=1-b;a=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+b*a)},_start:function(a,b){var c={handle:this.handles[b],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(b); +c.values=this.values()}return this._trigger("start",a,c)},_slide:function(a,b,c){var f;if(this.options.values&&this.options.values.length){f=this.values(b?0:1);if(this.options.values.length===2&&this.options.range===true&&(b===0&&c>f||b===1&&c1){this.options.values[a]=this._trimAlignValue(b);this._refreshValue();this._change(null,a)}else if(arguments.length)if(d.isArray(arguments[0])){c=this.options.values;f=arguments[0];for(e=0;e=this._valueMax())return this._valueMax();var b=this.options.step>0?this.options.step:1,c=(a-this._valueMin())%b;a=a-c;if(Math.abs(c)*2>=b)a+=c>0?b:-b;return parseFloat(a.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var a= +this.options.range,b=this.options,c=this,f=!this._animateOff?b.animate:false,e,j={},g,k,l,i;if(this.options.values&&this.options.values.length)this.handles.each(function(h){e=(c.values(h)-c._valueMin())/(c._valueMax()-c._valueMin())*100;j[c.orientation==="horizontal"?"left":"bottom"]=e+"%";d(this).stop(1,1)[f?"animate":"css"](j,b.animate);if(c.options.range===true)if(c.orientation==="horizontal"){if(h===0)c.range.stop(1,1)[f?"animate":"css"]({left:e+"%"},b.animate);if(h===1)c.range[f?"animate":"css"]({width:e- +g+"%"},{queue:false,duration:b.animate})}else{if(h===0)c.range.stop(1,1)[f?"animate":"css"]({bottom:e+"%"},b.animate);if(h===1)c.range[f?"animate":"css"]({height:e-g+"%"},{queue:false,duration:b.animate})}g=e});else{k=this.value();l=this._valueMin();i=this._valueMax();e=i!==l?(k-l)/(i-l)*100:0;j[c.orientation==="horizontal"?"left":"bottom"]=e+"%";this.handle.stop(1,1)[f?"animate":"css"](j,b.animate);if(a==="min"&&this.orientation==="horizontal")this.range.stop(1,1)[f?"animate":"css"]({width:e+"%"}, +b.animate);if(a==="max"&&this.orientation==="horizontal")this.range[f?"animate":"css"]({width:100-e+"%"},{queue:false,duration:b.animate});if(a==="min"&&this.orientation==="vertical")this.range.stop(1,1)[f?"animate":"css"]({height:e+"%"},b.animate);if(a==="max"&&this.orientation==="vertical")this.range[f?"animate":"css"]({height:100-e+"%"},{queue:false,duration:b.animate})}}});d.extend(d.ui.slider,{version:"1.8.16"})})(jQuery); +;/* + * jQuery UI Tabs 1.8.16 + * + * Copyright 2011, 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 + * + * Depends: + * jquery.ui.core.js + * jquery.ui.widget.js + */ +(function(d,p){function u(){return++v}function w(){return++x}var v=0,x=0;d.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:false,cookie:null,collapsible:false,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"
            ",remove:null,select:null,show:null,spinner:"Loading…",tabTemplate:"
          • #{label}
          • "},_create:function(){this._tabify(true)},_setOption:function(b,e){if(b=="selected")this.options.collapsible&& +e==this.options.selected||this.select(e);else{this.options[b]=e;this._tabify()}},_tabId:function(b){return b.title&&b.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+u()},_sanitizeSelector:function(b){return b.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+w());return d.cookie.apply(null,[b].concat(d.makeArray(arguments)))},_ui:function(b,e){return{tab:b,panel:e,index:this.anchors.index(b)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b= +d(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(b){function e(g,f){g.css("display","");!d.support.opacity&&f.opacity&&g[0].style.removeAttribute("filter")}var a=this,c=this.options,h=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=d(" > li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return d("a",this)[0]});this.panels=d([]);this.anchors.each(function(g,f){var i=d(f).attr("href"),l=i.split("#")[0],q;if(l&&(l===location.toString().split("#")[0]|| +(q=d("base")[0])&&l===q.href)){i=f.hash;f.href=i}if(h.test(i))a.panels=a.panels.add(a.element.find(a._sanitizeSelector(i)));else if(i&&i!=="#"){d.data(f,"href.tabs",i);d.data(f,"load.tabs",i.replace(/#.*$/,""));i=a._tabId(f);f.href="#"+i;f=a.element.find("#"+i);if(!f.length){f=d(c.panelTemplate).attr("id",i).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(a.panels[g-1]||a.list);f.data("destroy.tabs",true)}a.panels=a.panels.add(f)}else c.disabled.push(g)});if(b){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all"); +this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(c.selected===p){location.hash&&this.anchors.each(function(g,f){if(f.hash==location.hash){c.selected=g;return false}});if(typeof c.selected!=="number"&&c.cookie)c.selected=parseInt(a._cookie(),10);if(typeof c.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length)c.selected= +this.lis.index(this.lis.filter(".ui-tabs-selected"));c.selected=c.selected||(this.lis.length?0:-1)}else if(c.selected===null)c.selected=-1;c.selected=c.selected>=0&&this.anchors[c.selected]||c.selected<0?c.selected:0;c.disabled=d.unique(c.disabled.concat(d.map(this.lis.filter(".ui-state-disabled"),function(g){return a.lis.index(g)}))).sort();d.inArray(c.selected,c.disabled)!=-1&&c.disabled.splice(d.inArray(c.selected,c.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active"); +if(c.selected>=0&&this.anchors.length){a.element.find(a._sanitizeSelector(a.anchors[c.selected].hash)).removeClass("ui-tabs-hide");this.lis.eq(c.selected).addClass("ui-tabs-selected ui-state-active");a.element.queue("tabs",function(){a._trigger("show",null,a._ui(a.anchors[c.selected],a.element.find(a._sanitizeSelector(a.anchors[c.selected].hash))[0]))});this.load(c.selected)}d(window).bind("unload",function(){a.lis.add(a.anchors).unbind(".tabs");a.lis=a.anchors=a.panels=null})}else c.selected=this.lis.index(this.lis.filter(".ui-tabs-selected")); +this.element[c.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");c.cookie&&this._cookie(c.selected,c.cookie);b=0;for(var j;j=this.lis[b];b++)d(j)[d.inArray(b,c.disabled)!=-1&&!d(j).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");c.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(c.event!=="mouseover"){var k=function(g,f){f.is(":not(.ui-state-disabled)")&&f.addClass("ui-state-"+g)},n=function(g,f){f.removeClass("ui-state-"+ +g)};this.lis.bind("mouseover.tabs",function(){k("hover",d(this))});this.lis.bind("mouseout.tabs",function(){n("hover",d(this))});this.anchors.bind("focus.tabs",function(){k("focus",d(this).closest("li"))});this.anchors.bind("blur.tabs",function(){n("focus",d(this).closest("li"))})}var m,o;if(c.fx)if(d.isArray(c.fx)){m=c.fx[0];o=c.fx[1]}else m=o=c.fx;var r=o?function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.hide().removeClass("ui-tabs-hide").animate(o,o.duration||"normal", +function(){e(f,o);a._trigger("show",null,a._ui(g,f[0]))})}:function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");a._trigger("show",null,a._ui(g,f[0]))},s=m?function(g,f){f.animate(m,m.duration||"normal",function(){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");e(f,m);a.element.dequeue("tabs")})}:function(g,f){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");a.element.dequeue("tabs")}; +this.anchors.bind(c.event+".tabs",function(){var g=this,f=d(g).closest("li"),i=a.panels.filter(":not(.ui-tabs-hide)"),l=a.element.find(a._sanitizeSelector(g.hash));if(f.hasClass("ui-tabs-selected")&&!c.collapsible||f.hasClass("ui-state-disabled")||f.hasClass("ui-state-processing")||a.panels.filter(":animated").length||a._trigger("select",null,a._ui(this,l[0]))===false){this.blur();return false}c.selected=a.anchors.index(this);a.abort();if(c.collapsible)if(f.hasClass("ui-tabs-selected")){c.selected= +-1;c.cookie&&a._cookie(c.selected,c.cookie);a.element.queue("tabs",function(){s(g,i)}).dequeue("tabs");this.blur();return false}else if(!i.length){c.cookie&&a._cookie(c.selected,c.cookie);a.element.queue("tabs",function(){r(g,l)});a.load(a.anchors.index(this));this.blur();return false}c.cookie&&a._cookie(c.selected,c.cookie);if(l.length){i.length&&a.element.queue("tabs",function(){s(g,i)});a.element.queue("tabs",function(){r(g,l)});a.load(a.anchors.index(this))}else throw"jQuery UI Tabs: Mismatching fragment identifier."; +d.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return false})},_getIndex:function(b){if(typeof b=="string")b=this.anchors.index(this.anchors.filter("[href$="+b+"]"));return b},destroy:function(){var b=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var e= +d.data(this,"href.tabs");if(e)this.href=e;var a=d(this).unbind(".tabs");d.each(["href","load","cache"],function(c,h){a.removeData(h+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){d.data(this,"destroy.tabs")?d(this).remove():d(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});b.cookie&&this._cookie(null,b.cookie);return this},add:function(b, +e,a){if(a===p)a=this.anchors.length;var c=this,h=this.options;e=d(h.tabTemplate.replace(/#\{href\}/g,b).replace(/#\{label\}/g,e));b=!b.indexOf("#")?b.replace("#",""):this._tabId(d("a",e)[0]);e.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var j=c.element.find("#"+b);j.length||(j=d(h.panelTemplate).attr("id",b).data("destroy.tabs",true));j.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(a>=this.lis.length){e.appendTo(this.list);j.appendTo(this.list[0].parentNode)}else{e.insertBefore(this.lis[a]); +j.insertBefore(this.panels[a])}h.disabled=d.map(h.disabled,function(k){return k>=a?++k:k});this._tabify();if(this.anchors.length==1){h.selected=0;e.addClass("ui-tabs-selected ui-state-active");j.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){c._trigger("show",null,c._ui(c.anchors[0],c.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[a],this.panels[a]));return this},remove:function(b){b=this._getIndex(b);var e=this.options,a=this.lis.eq(b).remove(),c=this.panels.eq(b).remove(); +if(a.hasClass("ui-tabs-selected")&&this.anchors.length>1)this.select(b+(b+1=b?--h:h});this._tabify();this._trigger("remove",null,this._ui(a.find("a")[0],c[0]));return this},enable:function(b){b=this._getIndex(b);var e=this.options;if(d.inArray(b,e.disabled)!=-1){this.lis.eq(b).removeClass("ui-state-disabled");e.disabled=d.grep(e.disabled,function(a){return a!=b});this._trigger("enable",null, +this._ui(this.anchors[b],this.panels[b]));return this}},disable:function(b){b=this._getIndex(b);var e=this.options;if(b!=e.selected){this.lis.eq(b).addClass("ui-state-disabled");e.disabled.push(b);e.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[b],this.panels[b]))}return this},select:function(b){b=this._getIndex(b);if(b==-1)if(this.options.collapsible&&this.options.selected!=-1)b=this.options.selected;else return this;this.anchors.eq(b).trigger(this.options.event+".tabs");return this}, +load:function(b){b=this._getIndex(b);var e=this,a=this.options,c=this.anchors.eq(b)[0],h=d.data(c,"load.tabs");this.abort();if(!h||this.element.queue("tabs").length!==0&&d.data(c,"cache.tabs"))this.element.dequeue("tabs");else{this.lis.eq(b).addClass("ui-state-processing");if(a.spinner){var j=d("span",c);j.data("label.tabs",j.html()).html(a.spinner)}this.xhr=d.ajax(d.extend({},a.ajaxOptions,{url:h,success:function(k,n){e.element.find(e._sanitizeSelector(c.hash)).html(k);e._cleanup();a.cache&&d.data(c, +"cache.tabs",true);e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.success(k,n)}catch(m){}},error:function(k,n){e._cleanup();e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.error(k,n,b,c)}catch(m){}}}));e.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this}, +url:function(b,e){this.anchors.eq(b).removeData("cache.tabs").data("load.tabs",e);return this},length:function(){return this.anchors.length}});d.extend(d.ui.tabs,{version:"1.8.16"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:function(b,e){var a=this,c=this.options,h=a._rotate||(a._rotate=function(j){clearTimeout(a.rotation);a.rotation=setTimeout(function(){var k=c.selected;a.select(++k'))}function N(a){return a.bind("mouseout", +function(b){b=d(b.target).closest("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a");b.length&&b.removeClass("ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover")}).bind("mouseover",function(b){b=d(b.target).closest("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a");if(!(d.datepicker._isDisabledDatepicker(J.inline?a.parent()[0]:J.input[0])||!b.length)){b.parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"); +b.addClass("ui-state-hover");b.hasClass("ui-datepicker-prev")&&b.addClass("ui-datepicker-prev-hover");b.hasClass("ui-datepicker-next")&&b.addClass("ui-datepicker-next-hover")}})}function H(a,b){d.extend(a,b);for(var c in b)if(b[c]==null||b[c]==C)a[c]=b[c];return a}d.extend(d.ui,{datepicker:{version:"1.8.16"}});var B=(new Date).getTime(),J;d.extend(M.prototype,{markerClassName:"hasDatepicker",maxRows:4,log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv}, +setDefaults:function(a){H(this._defaults,a||{});return this},_attachDatepicker:function(a,b){var c=null;for(var e in this._defaults){var f=a.getAttribute("date:"+e);if(f){c=c||{};try{c[e]=eval(f)}catch(h){c[e]=f}}}e=a.nodeName.toLowerCase();f=e=="div"||e=="span";if(!a.id){this.uuid+=1;a.id="dp"+this.uuid}var i=this._newInst(d(a),f);i.settings=d.extend({},b||{},c||{});if(e=="input")this._connectDatepicker(a,i);else f&&this._inlineDatepicker(a,i)},_newInst:function(a,b){return{id:a[0].id.replace(/([^A-Za-z0-9_-])/g, +"\\\\$1"),input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:b,dpDiv:!b?this.dpDiv:N(d('
            '))}},_connectDatepicker:function(a,b){var c=d(a);b.append=d([]);b.trigger=d([]);if(!c.hasClass(this.markerClassName)){this._attachments(c,b);c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker", +function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});this._autoSize(b);d.data(a,"datepicker",b);b.settings.disabled&&this._disableDatepicker(a)}},_attachments:function(a,b){var c=this._get(b,"appendText"),e=this._get(b,"isRTL");b.append&&b.append.remove();if(c){b.append=d(''+c+"");a[e?"before":"after"](b.append)}a.unbind("focus",this._showDatepicker);b.trigger&&b.trigger.remove();c=this._get(b,"showOn");if(c== +"focus"||c=="both")a.focus(this._showDatepicker);if(c=="button"||c=="both"){c=this._get(b,"buttonText");var f=this._get(b,"buttonImage");b.trigger=d(this._get(b,"buttonImageOnly")?d("").addClass(this._triggerClass).attr({src:f,alt:c,title:c}):d('').addClass(this._triggerClass).html(f==""?c:d("").attr({src:f,alt:c,title:c})));a[e?"before":"after"](b.trigger);b.trigger.click(function(){d.datepicker._datepickerShowing&&d.datepicker._lastInput==a[0]?d.datepicker._hideDatepicker(): +d.datepicker._showDatepicker(a[0]);return false})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b=new Date(2009,11,20),c=this._get(a,"dateFormat");if(c.match(/[DM]/)){var e=function(f){for(var h=0,i=0,g=0;gh){h=f[g].length;i=g}return i};b.setMonth(e(this._get(a,c.match(/MM/)?"monthNames":"monthNamesShort")));b.setDate(e(this._get(a,c.match(/DD/)?"dayNames":"dayNamesShort"))+20-b.getDay())}a.input.attr("size",this._formatDate(a,b).length)}},_inlineDatepicker:function(a, +b){var c=d(a);if(!c.hasClass(this.markerClassName)){c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});d.data(a,"datepicker",b);this._setDate(b,this._getDefaultDate(b),true);this._updateDatepicker(b);this._updateAlternate(b);b.settings.disabled&&this._disableDatepicker(a);b.dpDiv.css("display","block")}},_dialogDatepicker:function(a,b,c,e,f){a=this._dialogInst;if(!a){this.uuid+= +1;this._dialogInput=d('');this._dialogInput.keydown(this._doKeyDown);d("body").append(this._dialogInput);a=this._dialogInst=this._newInst(this._dialogInput,false);a.settings={};d.data(this._dialogInput[0],"datepicker",a)}H(a.settings,e||{});b=b&&b.constructor==Date?this._formatDate(a,b):b;this._dialogInput.val(b);this._pos=f?f.length?f:[f.pageX,f.pageY]:null;if(!this._pos)this._pos=[document.documentElement.clientWidth/ +2-100+(document.documentElement.scrollLeft||document.body.scrollLeft),document.documentElement.clientHeight/2-150+(document.documentElement.scrollTop||document.body.scrollTop)];this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px");a.settings.onSelect=c;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);d.blockUI&&d.blockUI(this.dpDiv);d.data(this._dialogInput[0],"datepicker",a);return this},_destroyDatepicker:function(a){var b= +d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();d.removeData(a,"datepicker");if(e=="input"){c.append.remove();c.trigger.remove();b.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)}else if(e=="div"||e=="span")b.removeClass(this.markerClassName).empty()}},_enableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e= +a.nodeName.toLowerCase();if(e=="input"){a.disabled=false;c.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else if(e=="div"||e=="span"){b=b.children("."+this._inlineClass);b.children().removeClass("ui-state-disabled");b.find("select.ui-datepicker-month, select.ui-datepicker-year").removeAttr("disabled")}this._disabledInputs=d.map(this._disabledInputs,function(f){return f==a?null:f})}},_disableDatepicker:function(a){var b=d(a),c=d.data(a, +"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();if(e=="input"){a.disabled=true;c.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else if(e=="div"||e=="span"){b=b.children("."+this._inlineClass);b.children().addClass("ui-state-disabled");b.find("select.ui-datepicker-month, select.ui-datepicker-year").attr("disabled","disabled")}this._disabledInputs=d.map(this._disabledInputs,function(f){return f== +a?null:f});this._disabledInputs[this._disabledInputs.length]=a}},_isDisabledDatepicker:function(a){if(!a)return false;for(var b=0;b-1}},_doKeyUp:function(a){a=d.datepicker._getInst(a.target);if(a.input.val()!=a.lastVal)try{if(d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),a.input?a.input.val():null,d.datepicker._getFormatConfig(a))){d.datepicker._setDateFromField(a);d.datepicker._updateAlternate(a);d.datepicker._updateDatepicker(a)}}catch(b){d.datepicker.log(b)}return true},_showDatepicker:function(a){a=a.target||a;if(a.nodeName.toLowerCase()!="input")a=d("input", +a.parentNode)[0];if(!(d.datepicker._isDisabledDatepicker(a)||d.datepicker._lastInput==a)){var b=d.datepicker._getInst(a);if(d.datepicker._curInst&&d.datepicker._curInst!=b){d.datepicker._datepickerShowing&&d.datepicker._triggerOnClose(d.datepicker._curInst);d.datepicker._curInst.dpDiv.stop(true,true)}var c=d.datepicker._get(b,"beforeShow");c=c?c.apply(a,[a,b]):{};if(c!==false){H(b.settings,c);b.lastVal=null;d.datepicker._lastInput=a;d.datepicker._setDateFromField(b);if(d.datepicker._inDialog)a.value= +"";if(!d.datepicker._pos){d.datepicker._pos=d.datepicker._findPos(a);d.datepicker._pos[1]+=a.offsetHeight}var e=false;d(a).parents().each(function(){e|=d(this).css("position")=="fixed";return!e});if(e&&d.browser.opera){d.datepicker._pos[0]-=document.documentElement.scrollLeft;d.datepicker._pos[1]-=document.documentElement.scrollTop}c={left:d.datepicker._pos[0],top:d.datepicker._pos[1]};d.datepicker._pos=null;b.dpDiv.empty();b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});d.datepicker._updateDatepicker(b); +c=d.datepicker._checkOffset(b,c,e);b.dpDiv.css({position:d.datepicker._inDialog&&d.blockUI?"static":e?"fixed":"absolute",display:"none",left:c.left+"px",top:c.top+"px"});if(!b.inline){c=d.datepicker._get(b,"showAnim");var f=d.datepicker._get(b,"duration"),h=function(){var i=b.dpDiv.find("iframe.ui-datepicker-cover");if(i.length){var g=d.datepicker._getBorders(b.dpDiv);i.css({left:-g[0],top:-g[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})}};b.dpDiv.zIndex(d(a).zIndex()+1);d.datepicker._datepickerShowing= +true;d.effects&&d.effects[c]?b.dpDiv.show(c,d.datepicker._get(b,"showOptions"),f,h):b.dpDiv[c||"show"](c?f:null,h);if(!c||!f)h();b.input.is(":visible")&&!b.input.is(":disabled")&&b.input.focus();d.datepicker._curInst=b}}}},_updateDatepicker:function(a){this.maxRows=4;var b=d.datepicker._getBorders(a.dpDiv);J=a;a.dpDiv.empty().append(this._generateHTML(a));var c=a.dpDiv.find("iframe.ui-datepicker-cover");c.length&&c.css({left:-b[0],top:-b[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()}); +a.dpDiv.find("."+this._dayOverClass+" a").mouseover();b=this._getNumberOfMonths(a);c=b[1];a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");c>1&&a.dpDiv.addClass("ui-datepicker-multi-"+c).css("width",17*c+"em");a.dpDiv[(b[0]!=1||b[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");a==d.datepicker._curInst&&d.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&& +!a.input.is(":disabled")&&a.input[0]!=document.activeElement&&a.input.focus();if(a.yearshtml){var e=a.yearshtml;setTimeout(function(){e===a.yearshtml&&a.yearshtml&&a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml);e=a.yearshtml=null},0)}},_getBorders:function(a){var b=function(c){return{thin:1,medium:2,thick:3}[c]||c};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]},_checkOffset:function(a,b,c){var e=a.dpDiv.outerWidth(),f=a.dpDiv.outerHeight(), +h=a.input?a.input.outerWidth():0,i=a.input?a.input.outerHeight():0,g=document.documentElement.clientWidth+d(document).scrollLeft(),j=document.documentElement.clientHeight+d(document).scrollTop();b.left-=this._get(a,"isRTL")?e-h:0;b.left-=c&&b.left==a.input.offset().left?d(document).scrollLeft():0;b.top-=c&&b.top==a.input.offset().top+i?d(document).scrollTop():0;b.left-=Math.min(b.left,b.left+e>g&&g>e?Math.abs(b.left+e-g):0);b.top-=Math.min(b.top,b.top+f>j&&j>f?Math.abs(f+i):0);return b},_findPos:function(a){for(var b= +this._get(this._getInst(a),"isRTL");a&&(a.type=="hidden"||a.nodeType!=1||d.expr.filters.hidden(a));)a=a[b?"previousSibling":"nextSibling"];a=d(a).offset();return[a.left,a.top]},_triggerOnClose:function(a){var b=this._get(a,"onClose");if(b)b.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a])},_hideDatepicker:function(a){var b=this._curInst;if(!(!b||a&&b!=d.data(a,"datepicker")))if(this._datepickerShowing){a=this._get(b,"showAnim");var c=this._get(b,"duration"),e=function(){d.datepicker._tidyDialog(b); +this._curInst=null};d.effects&&d.effects[a]?b.dpDiv.hide(a,d.datepicker._get(b,"showOptions"),c,e):b.dpDiv[a=="slideDown"?"slideUp":a=="fadeIn"?"fadeOut":"hide"](a?c:null,e);a||e();d.datepicker._triggerOnClose(b);this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if(d.blockUI){d.unblockUI();d("body").append(this.dpDiv)}}this._inDialog=false}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")}, +_checkExternalClick:function(a){if(d.datepicker._curInst){a=d(a.target);a[0].id!=d.datepicker._mainDivId&&a.parents("#"+d.datepicker._mainDivId).length==0&&!a.hasClass(d.datepicker.markerClassName)&&!a.hasClass(d.datepicker._triggerClass)&&d.datepicker._datepickerShowing&&!(d.datepicker._inDialog&&d.blockUI)&&d.datepicker._hideDatepicker()}},_adjustDate:function(a,b,c){a=d(a);var e=this._getInst(a[0]);if(!this._isDisabledDatepicker(a[0])){this._adjustInstDate(e,b+(c=="M"?this._get(e,"showCurrentAtPos"): +0),c);this._updateDatepicker(e)}},_gotoToday:function(a){a=d(a);var b=this._getInst(a[0]);if(this._get(b,"gotoCurrent")&&b.currentDay){b.selectedDay=b.currentDay;b.drawMonth=b.selectedMonth=b.currentMonth;b.drawYear=b.selectedYear=b.currentYear}else{var c=new Date;b.selectedDay=c.getDate();b.drawMonth=b.selectedMonth=c.getMonth();b.drawYear=b.selectedYear=c.getFullYear()}this._notifyChange(b);this._adjustDate(a)},_selectMonthYear:function(a,b,c){a=d(a);var e=this._getInst(a[0]);e["selected"+(c=="M"? +"Month":"Year")]=e["draw"+(c=="M"?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10);this._notifyChange(e);this._adjustDate(a)},_selectDay:function(a,b,c,e){var f=d(a);if(!(d(e).hasClass(this._unselectableClass)||this._isDisabledDatepicker(f[0]))){f=this._getInst(f[0]);f.selectedDay=f.currentDay=d("a",e).html();f.selectedMonth=f.currentMonth=b;f.selectedYear=f.currentYear=c;this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear))}},_clearDate:function(a){a=d(a); +this._getInst(a[0]);this._selectDate(a,"")},_selectDate:function(a,b){a=this._getInst(d(a)[0]);b=b!=null?b:this._formatDate(a);a.input&&a.input.val(b);this._updateAlternate(a);var c=this._get(a,"onSelect");if(c)c.apply(a.input?a.input[0]:null,[b,a]);else a.input&&a.input.trigger("change");if(a.inline)this._updateDatepicker(a);else{this._hideDatepicker();this._lastInput=a.input[0];typeof a.input[0]!="object"&&a.input.focus();this._lastInput=null}},_updateAlternate:function(a){var b=this._get(a,"altField"); +if(b){var c=this._get(a,"altFormat")||this._get(a,"dateFormat"),e=this._getDate(a),f=this.formatDate(c,e,this._getFormatConfig(a));d(b).each(function(){d(this).val(f)})}},noWeekends:function(a){a=a.getDay();return[a>0&&a<6,""]},iso8601Week:function(a){a=new Date(a.getTime());a.setDate(a.getDate()+4-(a.getDay()||7));var b=a.getTime();a.setMonth(0);a.setDate(1);return Math.floor(Math.round((b-a)/864E5)/7)+1},parseDate:function(a,b,c){if(a==null||b==null)throw"Invalid arguments";b=typeof b=="object"? +b.toString():b+"";if(b=="")return null;var e=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff;e=typeof e!="string"?e:(new Date).getFullYear()%100+parseInt(e,10);for(var f=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,h=(c?c.dayNames:null)||this._defaults.dayNames,i=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,g=(c?c.monthNames:null)||this._defaults.monthNames,j=c=-1,l=-1,u=-1,k=false,o=function(p){(p=A+1-1){j=1;l=u;do{e=this._getDaysInMonth(c,j-1);if(l<=e)break;j++;l-=e}while(1)}v=this._daylightSavingAdjust(new Date(c,j-1,l));if(v.getFullYear()!=c||v.getMonth()+1!=j||v.getDate()!=l)throw"Invalid date";return v},ATOM:"yy-mm-dd", +COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*1E7,formatDate:function(a,b,c){if(!b)return"";var e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,h=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort;c=(c?c.monthNames: +null)||this._defaults.monthNames;var i=function(o){(o=k+1 +12?a.getHours()+2:0);return a},_setDate:function(a,b,c){var e=!b,f=a.selectedMonth,h=a.selectedYear;b=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=a.currentDay=b.getDate();a.drawMonth=a.selectedMonth=a.currentMonth=b.getMonth();a.drawYear=a.selectedYear=a.currentYear=b.getFullYear();if((f!=a.selectedMonth||h!=a.selectedYear)&&!c)this._notifyChange(a);this._adjustInstDate(a);if(a.input)a.input.val(e?"":this._formatDate(a))},_getDate:function(a){return!a.currentYear||a.input&& +a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay))},_generateHTML:function(a){var b=new Date;b=this._daylightSavingAdjust(new Date(b.getFullYear(),b.getMonth(),b.getDate()));var c=this._get(a,"isRTL"),e=this._get(a,"showButtonPanel"),f=this._get(a,"hideIfNoPrevNext"),h=this._get(a,"navigationAsDateFormat"),i=this._getNumberOfMonths(a),g=this._get(a,"showCurrentAtPos"),j=this._get(a,"stepMonths"),l=i[0]!=1||i[1]!=1,u=this._daylightSavingAdjust(!a.currentDay? +new Date(9999,9,9):new Date(a.currentYear,a.currentMonth,a.currentDay)),k=this._getMinMaxDate(a,"min"),o=this._getMinMaxDate(a,"max");g=a.drawMonth-g;var m=a.drawYear;if(g<0){g+=12;m--}if(o){var n=this._daylightSavingAdjust(new Date(o.getFullYear(),o.getMonth()-i[0]*i[1]+1,o.getDate()));for(n=k&&nn;){g--;if(g<0){g=11;m--}}}a.drawMonth=g;a.drawYear=m;n=this._get(a,"prevText");n=!h?n:this.formatDate(n,this._daylightSavingAdjust(new Date(m,g-j,1)),this._getFormatConfig(a)); +n=this._canAdjustMonth(a,-1,m,g)?''+n+"":f?"":''+n+"";var s=this._get(a,"nextText");s=!h?s:this.formatDate(s,this._daylightSavingAdjust(new Date(m, +g+j,1)),this._getFormatConfig(a));f=this._canAdjustMonth(a,+1,m,g)?''+s+"":f?"":''+s+"";j=this._get(a,"currentText");s=this._get(a,"gotoCurrent")&& +a.currentDay?u:b;j=!h?j:this.formatDate(j,s,this._getFormatConfig(a));h=!a.inline?'":"";e=e?'
            '+(c?h:"")+(this._isInRange(a,s)?'":"")+(c?"":h)+"
            ":"";h=parseInt(this._get(a,"firstDay"),10);h=isNaN(h)?0:h;j=this._get(a,"showWeek");s=this._get(a,"dayNames");this._get(a,"dayNamesShort");var q=this._get(a,"dayNamesMin"),A=this._get(a,"monthNames"),v=this._get(a,"monthNamesShort"),p=this._get(a,"beforeShowDay"),D=this._get(a,"showOtherMonths"),K=this._get(a,"selectOtherMonths");this._get(a,"calculateWeek");for(var E=this._getDefaultDate(a),w="",x=0;x1)switch(G){case 0:y+=" ui-datepicker-group-first";t=" ui-corner-"+(c?"right":"left");break;case i[1]-1:y+=" ui-datepicker-group-last";t=" ui-corner-"+(c?"left":"right");break;default:y+=" ui-datepicker-group-middle";t="";break}y+='">'}y+='
            '+(/all|left/.test(t)&& +x==0?c?f:n:"")+(/all|right/.test(t)&&x==0?c?n:f:"")+this._generateMonthYearHeader(a,g,m,k,o,x>0||G>0,A,v)+'
            ';var z=j?'":"";for(t=0;t<7;t++){var r=(t+h)%7;z+="=5?' class="ui-datepicker-week-end"':"")+'>'+q[r]+""}y+=z+"";z=this._getDaysInMonth(m,g);if(m==a.selectedYear&&g==a.selectedMonth)a.selectedDay=Math.min(a.selectedDay, +z);t=(this._getFirstDayOfMonth(m,g)-h+7)%7;z=Math.ceil((t+z)/7);this.maxRows=z=l?this.maxRows>z?this.maxRows:z:z;r=this._daylightSavingAdjust(new Date(m,g,1-t));for(var Q=0;Q";var R=!j?"":'";for(t=0;t<7;t++){var I=p?p.apply(a.input?a.input[0]:null,[r]):[true,""],F=r.getMonth()!=g,L=F&&!K||!I[0]||k&&ro;R+='";r.setDate(r.getDate()+1);r=this._daylightSavingAdjust(r)}y+=R+""}g++;if(g>11){g=0;m++}y+="
            '+this._get(a,"weekHeader")+"
            '+this._get(a,"calculateWeek")(r)+""+(F&&!D?" ":L?''+ +r.getDate()+"":''+r.getDate()+"")+"
            "+(l?""+(i[0]>0&&G==i[1]-1?'
            ':""):"");O+=y}w+=O}w+=e+(d.browser.msie&&parseInt(d.browser.version,10)<7&&!a.inline?'': +"");a._keyEvent=false;return w},_generateMonthYearHeader:function(a,b,c,e,f,h,i,g){var j=this._get(a,"changeMonth"),l=this._get(a,"changeYear"),u=this._get(a,"showMonthAfterYear"),k='
            ',o="";if(h||!j)o+=''+i[b]+"";else{i=e&&e.getFullYear()==c;var m=f&&f.getFullYear()==c;o+='"}u||(k+=o+(h||!(j&&l)?" ":""));if(!a.yearshtml){a.yearshtml="";if(h||!l)k+=''+c+"";else{g=this._get(a,"yearRange").split(":");var s=(new Date).getFullYear();i=function(q){q=q.match(/c[+-].*/)?c+parseInt(q.substring(1),10):q.match(/[+-].*/)?s+parseInt(q,10):parseInt(q,10);return isNaN(q)?s:q};b=i(g[0]);g=Math.max(b,i(g[1]||""));b=e?Math.max(b, +e.getFullYear()):b;g=f?Math.min(g,f.getFullYear()):g;for(a.yearshtml+='";k+=a.yearshtml;a.yearshtml=null}}k+=this._get(a,"yearSuffix");if(u)k+=(h||!(j&&l)?" ":"")+o;k+="
            ";return k},_adjustInstDate:function(a,b,c){var e=a.drawYear+(c=="Y"?b:0),f=a.drawMonth+ +(c=="M"?b:0);b=Math.min(a.selectedDay,this._getDaysInMonth(e,f))+(c=="D"?b:0);e=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(e,f,b)));a.selectedDay=e.getDate();a.drawMonth=a.selectedMonth=e.getMonth();a.drawYear=a.selectedYear=e.getFullYear();if(c=="M"||c=="Y")this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");b=c&&ba?a:b},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");if(b)b.apply(a.input? +a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return a==null?[1,1]:typeof a=="number"?[1,a]:a},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,e){var f=this._getNumberOfMonths(a);c=this._daylightSavingAdjust(new Date(c, +e+(b<0?b:f[0]*f[1]),1));b<0&&c.setDate(this._getDaysInMonth(c.getFullYear(),c.getMonth()));return this._isInRange(a,c)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!a||b.getTime()<=a.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10);return{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a, +"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,e){if(!b){a.currentDay=a.selectedDay;a.currentMonth=a.selectedMonth;a.currentYear=a.selectedYear}b=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(e,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),b,this._getFormatConfig(a))}});d.fn.datepicker=function(a){if(!this.length)return this; +if(!d.datepicker.initialized){d(document).mousedown(d.datepicker._checkExternalClick).find("body").append(d.datepicker.dpDiv);d.datepicker.initialized=true}var b=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getDate"||a=="widget"))return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b));if(a=="option"&&arguments.length==2&&typeof arguments[1]=="string")return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b));return this.each(function(){typeof a== +"string"?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this].concat(b)):d.datepicker._attachDatepicker(this,a)})};d.datepicker=new M;d.datepicker.initialized=false;d.datepicker.uuid=(new Date).getTime();d.datepicker.version="1.8.16";window["DP_jQuery_"+B]=d})(jQuery); +;/* + * jQuery UI Progressbar 1.8.16 + * + * Copyright 2011, 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 + * + * Depends: + * jquery.ui.core.js + * jquery.ui.widget.js + */ +(function(b,d){b.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()});this.valueDiv=b("
            ").appendTo(this.element);this.oldValue=this._value();this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"); +this.valueDiv.remove();b.Widget.prototype.destroy.apply(this,arguments)},value:function(a){if(a===d)return this._value();this._setOption("value",a);return this},_setOption:function(a,c){if(a==="value"){this.options.value=c;this._refreshValue();this._value()===this.options.max&&this._trigger("complete")}b.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;if(typeof a!=="number")a=0;return Math.min(this.options.max,Math.max(this.min,a))},_percentage:function(){return 100* +this._value()/this.options.max},_refreshValue:function(){var a=this.value(),c=this._percentage();if(this.oldValue!==a){this.oldValue=a;this._trigger("change")}this.valueDiv.toggle(a>this.min).toggleClass("ui-corner-right",a===this.options.max).width(c.toFixed(0)+"%");this.element.attr("aria-valuenow",a)}});b.extend(b.ui.progressbar,{version:"1.8.16"})})(jQuery); +;/* + * jQuery UI Effects 1.8.16 + * + * Copyright 2011, 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/Effects/ + */ +jQuery.effects||function(f,j){function m(c){var a;if(c&&c.constructor==Array&&c.length==3)return c;if(a=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c))return[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10)];if(a=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c))return[parseFloat(a[1])*2.55,parseFloat(a[2])*2.55,parseFloat(a[3])*2.55];if(a=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c))return[parseInt(a[1], +16),parseInt(a[2],16),parseInt(a[3],16)];if(a=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c))return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(c))return n.transparent;return n[f.trim(c).toLowerCase()]}function s(c,a){var b;do{b=f.curCSS(c,a);if(b!=""&&b!="transparent"||f.nodeName(c,"body"))break;a="backgroundColor"}while(c=c.parentNode);return m(b)}function o(){var c=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle, +a={},b,d;if(c&&c.length&&c[0]&&c[c[0]])for(var e=c.length;e--;){b=c[e];if(typeof c[b]=="string"){d=b.replace(/\-(\w)/g,function(g,h){return h.toUpperCase()});a[d]=c[b]}}else for(b in c)if(typeof c[b]==="string")a[b]=c[b];return a}function p(c){var a,b;for(a in c){b=c[a];if(b==null||f.isFunction(b)||a in t||/scrollbar/.test(a)||!/color/i.test(a)&&isNaN(parseFloat(b)))delete c[a]}return c}function u(c,a){var b={_:0},d;for(d in a)if(c[d]!=a[d])b[d]=a[d];return b}function k(c,a,b,d){if(typeof c=="object"){d= +a;b=null;a=c;c=a.effect}if(f.isFunction(a)){d=a;b=null;a={}}if(typeof a=="number"||f.fx.speeds[a]){d=b;b=a;a={}}if(f.isFunction(b)){d=b;b=null}a=a||{};b=b||a.duration;b=f.fx.off?0:typeof b=="number"?b:b in f.fx.speeds?f.fx.speeds[b]:f.fx.speeds._default;d=d||a.complete;return[c,a,b,d]}function l(c){if(!c||typeof c==="number"||f.fx.speeds[c])return true;if(typeof c==="string"&&!f.effects[c])return true;return false}f.effects={};f.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor", +"borderTopColor","borderColor","color","outlineColor"],function(c,a){f.fx.step[a]=function(b){if(!b.colorInit){b.start=s(b.elem,a);b.end=m(b.end);b.colorInit=true}b.elem.style[a]="rgb("+Math.max(Math.min(parseInt(b.pos*(b.end[0]-b.start[0])+b.start[0],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[1]-b.start[1])+b.start[1],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[2]-b.start[2])+b.start[2],10),255),0)+")"}});var n={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0, +0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211, +211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},q=["add","remove","toggle"],t={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};f.effects.animateClass=function(c,a,b, +d){if(f.isFunction(b)){d=b;b=null}return this.queue(function(){var e=f(this),g=e.attr("style")||" ",h=p(o.call(this)),r,v=e.attr("class");f.each(q,function(w,i){c[i]&&e[i+"Class"](c[i])});r=p(o.call(this));e.attr("class",v);e.animate(u(h,r),{queue:false,duration:a,easing:b,complete:function(){f.each(q,function(w,i){c[i]&&e[i+"Class"](c[i])});if(typeof e.attr("style")=="object"){e.attr("style").cssText="";e.attr("style").cssText=g}else e.attr("style",g);d&&d.apply(this,arguments);f.dequeue(this)}})})}; +f.fn.extend({_addClass:f.fn.addClass,addClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{add:c},a,b,d]):this._addClass(c)},_removeClass:f.fn.removeClass,removeClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{remove:c},a,b,d]):this._removeClass(c)},_toggleClass:f.fn.toggleClass,toggleClass:function(c,a,b,d,e){return typeof a=="boolean"||a===j?b?f.effects.animateClass.apply(this,[a?{add:c}:{remove:c},b,d,e]):this._toggleClass(c,a):f.effects.animateClass.apply(this, +[{toggle:c},a,b,d])},switchClass:function(c,a,b,d,e){return f.effects.animateClass.apply(this,[{add:a,remove:c},b,d,e])}});f.extend(f.effects,{version:"1.8.16",save:function(c,a){for(var b=0;b").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}), +d=document.activeElement;c.wrap(b);if(c[0]===d||f.contains(c[0],d))f(d).focus();b=c.parent();if(c.css("position")=="static"){b.css({position:"relative"});c.css({position:"relative"})}else{f.extend(a,{position:c.css("position"),zIndex:c.css("z-index")});f.each(["top","left","bottom","right"],function(e,g){a[g]=c.css(g);if(isNaN(parseInt(a[g],10)))a[g]="auto"});c.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}return b.css(a).show()},removeWrapper:function(c){var a,b=document.activeElement; +if(c.parent().is(".ui-effects-wrapper")){a=c.parent().replaceWith(c);if(c[0]===b||f.contains(c[0],b))f(b).focus();return a}return c},setTransition:function(c,a,b,d){d=d||{};f.each(a,function(e,g){unit=c.cssUnit(g);if(unit[0]>0)d[g]=unit[0]*b+unit[1]});return d}});f.fn.extend({effect:function(c){var a=k.apply(this,arguments),b={options:a[1],duration:a[2],callback:a[3]};a=b.options.mode;var d=f.effects[c];if(f.fx.off||!d)return a?this[a](b.duration,b.callback):this.each(function(){b.callback&&b.callback.call(this)}); +return d.call(this,b)},_show:f.fn.show,show:function(c){if(l(c))return this._show.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="show";return this.effect.apply(this,a)}},_hide:f.fn.hide,hide:function(c){if(l(c))return this._hide.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="hide";return this.effect.apply(this,a)}},__toggle:f.fn.toggle,toggle:function(c){if(l(c)||typeof c==="boolean"||f.isFunction(c))return this.__toggle.apply(this,arguments);else{var a=k.apply(this, +arguments);a[1].mode="toggle";return this.effect.apply(this,a)}},cssUnit:function(c){var a=this.css(c),b=[];f.each(["em","px","%","pt"],function(d,e){if(a.indexOf(e)>0)b=[parseFloat(a),e]});return b}});f.easing.jswing=f.easing.swing;f.extend(f.easing,{def:"easeOutQuad",swing:function(c,a,b,d,e){return f.easing[f.easing.def](c,a,b,d,e)},easeInQuad:function(c,a,b,d,e){return d*(a/=e)*a+b},easeOutQuad:function(c,a,b,d,e){return-d*(a/=e)*(a-2)+b},easeInOutQuad:function(c,a,b,d,e){if((a/=e/2)<1)return d/ +2*a*a+b;return-d/2*(--a*(a-2)-1)+b},easeInCubic:function(c,a,b,d,e){return d*(a/=e)*a*a+b},easeOutCubic:function(c,a,b,d,e){return d*((a=a/e-1)*a*a+1)+b},easeInOutCubic:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a+b;return d/2*((a-=2)*a*a+2)+b},easeInQuart:function(c,a,b,d,e){return d*(a/=e)*a*a*a+b},easeOutQuart:function(c,a,b,d,e){return-d*((a=a/e-1)*a*a*a-1)+b},easeInOutQuart:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a+b;return-d/2*((a-=2)*a*a*a-2)+b},easeInQuint:function(c,a,b, +d,e){return d*(a/=e)*a*a*a*a+b},easeOutQuint:function(c,a,b,d,e){return d*((a=a/e-1)*a*a*a*a+1)+b},easeInOutQuint:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a*a+b;return d/2*((a-=2)*a*a*a*a+2)+b},easeInSine:function(c,a,b,d,e){return-d*Math.cos(a/e*(Math.PI/2))+d+b},easeOutSine:function(c,a,b,d,e){return d*Math.sin(a/e*(Math.PI/2))+b},easeInOutSine:function(c,a,b,d,e){return-d/2*(Math.cos(Math.PI*a/e)-1)+b},easeInExpo:function(c,a,b,d,e){return a==0?b:d*Math.pow(2,10*(a/e-1))+b},easeOutExpo:function(c, +a,b,d,e){return a==e?b+d:d*(-Math.pow(2,-10*a/e)+1)+b},easeInOutExpo:function(c,a,b,d,e){if(a==0)return b;if(a==e)return b+d;if((a/=e/2)<1)return d/2*Math.pow(2,10*(a-1))+b;return d/2*(-Math.pow(2,-10*--a)+2)+b},easeInCirc:function(c,a,b,d,e){return-d*(Math.sqrt(1-(a/=e)*a)-1)+b},easeOutCirc:function(c,a,b,d,e){return d*Math.sqrt(1-(a=a/e-1)*a)+b},easeInOutCirc:function(c,a,b,d,e){if((a/=e/2)<1)return-d/2*(Math.sqrt(1-a*a)-1)+b;return d/2*(Math.sqrt(1-(a-=2)*a)+1)+b},easeInElastic:function(c,a,b, +d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h").css({position:"absolute",visibility:"visible",left:-f*(h/d),top:-e*(i/c)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:h/d,height:i/c,left:g.left+f*(h/d)+(a.options.mode=="show"?(f-Math.floor(d/2))*(h/d):0),top:g.top+e*(i/c)+(a.options.mode=="show"?(e-Math.floor(c/2))*(i/c):0),opacity:a.options.mode=="show"?0:1}).animate({left:g.left+f*(h/d)+(a.options.mode=="show"?0:(f-Math.floor(d/2))*(h/d)),top:g.top+ +e*(i/c)+(a.options.mode=="show"?0:(e-Math.floor(c/2))*(i/c)),opacity:a.options.mode=="show"?1:0},a.duration||500);setTimeout(function(){a.options.mode=="show"?b.css({visibility:"visible"}):b.css({visibility:"visible"}).hide();a.callback&&a.callback.apply(b[0]);b.dequeue();j("div.ui-effects-explode").remove()},a.duration||500)})}})(jQuery); +;/* + * jQuery UI Effects Fade 1.8.16 + * + * Copyright 2011, 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/Effects/Fade + * + * Depends: + * jquery.effects.core.js + */ +(function(b){b.effects.fade=function(a){return this.queue(function(){var c=b(this),d=b.effects.setMode(c,a.options.mode||"hide");c.animate({opacity:d},{queue:false,duration:a.duration,easing:a.options.easing,complete:function(){a.callback&&a.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery); +;/* + * jQuery UI Effects Fold 1.8.16 + * + * Copyright 2011, 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/Effects/Fold + * + * Depends: + * jquery.effects.core.js + */ +(function(c){c.effects.fold=function(a){return this.queue(function(){var b=c(this),j=["position","top","bottom","left","right"],d=c.effects.setMode(b,a.options.mode||"hide"),g=a.options.size||15,h=!!a.options.horizFirst,k=a.duration?a.duration/2:c.fx.speeds._default/2;c.effects.save(b,j);b.show();var e=c.effects.createWrapper(b).css({overflow:"hidden"}),f=d=="show"!=h,l=f?["width","height"]:["height","width"];f=f?[e.width(),e.height()]:[e.height(),e.width()];var i=/([0-9]+)%/.exec(g);if(i)g=parseInt(i[1], +10)/100*f[d=="hide"?0:1];if(d=="show")e.css(h?{height:0,width:g}:{height:g,width:0});h={};i={};h[l[0]]=d=="show"?f[0]:g;i[l[1]]=d=="show"?f[1]:0;e.animate(h,k,a.options.easing).animate(i,k,a.options.easing,function(){d=="hide"&&b.hide();c.effects.restore(b,j);c.effects.removeWrapper(b);a.callback&&a.callback.apply(b[0],arguments);b.dequeue()})})}})(jQuery); +;/* + * jQuery UI Effects Highlight 1.8.16 + * + * Copyright 2011, 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/Effects/Highlight + * + * Depends: + * jquery.effects.core.js + */ +(function(b){b.effects.highlight=function(c){return this.queue(function(){var a=b(this),e=["backgroundImage","backgroundColor","opacity"],d=b.effects.setMode(a,c.options.mode||"show"),f={backgroundColor:a.css("backgroundColor")};if(d=="hide")f.opacity=0;b.effects.save(a,e);a.show().css({backgroundImage:"none",backgroundColor:c.options.color||"#ffff99"}).animate(f,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){d=="hide"&&a.hide();b.effects.restore(a,e);d=="show"&&!b.support.opacity&& +this.style.removeAttribute("filter");c.callback&&c.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery); +;/* + * jQuery UI Effects Pulsate 1.8.16 + * + * Copyright 2011, 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/Effects/Pulsate + * + * Depends: + * jquery.effects.core.js + */ +(function(d){d.effects.pulsate=function(a){return this.queue(function(){var b=d(this),c=d.effects.setMode(b,a.options.mode||"show");times=(a.options.times||5)*2-1;duration=a.duration?a.duration/2:d.fx.speeds._default/2;isVisible=b.is(":visible");animateTo=0;if(!isVisible){b.css("opacity",0).show();animateTo=1}if(c=="hide"&&isVisible||c=="show"&&!isVisible)times--;for(c=0;c').appendTo(document.body).addClass(a.options.className).css({top:d.top,left:d.left,height:b.innerHeight(),width:b.innerWidth(),position:"absolute"}).animate(c,a.duration,a.options.easing,function(){f.remove();a.callback&&a.callback.apply(b[0],arguments); +b.dequeue()})})}})(jQuery); +; \ No newline at end of file diff --git a/app/assets/stylesheets/admin.css.less b/app/assets/stylesheets/admin.css.less index 2e61763..cb69330 100644 --- a/app/assets/stylesheets/admin.css.less +++ b/app/assets/stylesheets/admin.css.less @@ -1,6 +1,6 @@ @import "./vendor/framework/variables.less"; @import "./vendor/framework/bootstrap.less"; -@import "./vendor/fontawesome/font-awesome"; +@import "fontawesome/font-awesome"; @import "./vendor/redactor"; diff --git a/app/assets/stylesheets/admin/framework/accordion.less b/app/assets/stylesheets/admin/framework/accordion.less new file mode 100755 index 0000000..d63523b --- /dev/null +++ b/app/assets/stylesheets/admin/framework/accordion.less @@ -0,0 +1,34 @@ +// +// Accordion +// -------------------------------------------------- + + +// Parent container +.accordion { + margin-bottom: @baseLineHeight; +} + +// Group == heading + body +.accordion-group { + margin-bottom: 2px; + border: 1px solid #e5e5e5; + .border-radius(@baseBorderRadius); +} +.accordion-heading { + border-bottom: 0; +} +.accordion-heading .accordion-toggle { + display: block; + padding: 8px 15px; +} + +// General toggle styles +.accordion-toggle { + cursor: pointer; +} + +// Inner needs the styles because you can't animate properly with any styles on the element +.accordion-inner { + padding: 9px 15px; + border-top: 1px solid #e5e5e5; +} diff --git a/app/assets/stylesheets/admin/framework/alerts.less b/app/assets/stylesheets/admin/framework/alerts.less new file mode 100755 index 0000000..0116b19 --- /dev/null +++ b/app/assets/stylesheets/admin/framework/alerts.less @@ -0,0 +1,79 @@ +// +// Alerts +// -------------------------------------------------- + + +// Base styles +// ------------------------- + +.alert { + padding: 8px 35px 8px 14px; + margin-bottom: @baseLineHeight; + text-shadow: 0 1px 0 rgba(255,255,255,.5); + background-color: @warningBackground; + border: 1px solid @warningBorder; + .border-radius(@baseBorderRadius); +} +.alert, +.alert h4 { + // Specified for the h4 to prevent conflicts of changing @headingsColor + color: @warningText; +} +.alert h4 { + margin: 0; +} + +// Adjust close link position +.alert .close { + position: relative; + top: -2px; + right: -21px; + line-height: @baseLineHeight; +} + + +// Alternate styles +// ------------------------- + +.alert-success { + background-color: @successBackground; + border-color: @successBorder; + color: @successText; +} +.alert-success h4 { + color: @successText; +} +.alert-danger, +.alert-error { + background-color: @errorBackground; + border-color: @errorBorder; + color: @errorText; +} +.alert-danger h4, +.alert-error h4 { + color: @errorText; +} +.alert-info { + background-color: @infoBackground; + border-color: @infoBorder; + color: @infoText; +} +.alert-info h4 { + color: @infoText; +} + + +// Block alerts +// ------------------------- + +.alert-block { + padding-top: 14px; + padding-bottom: 14px; +} +.alert-block > p, +.alert-block > ul { + margin-bottom: 0; +} +.alert-block p + p { + margin-top: 5px; +} diff --git a/app/assets/stylesheets/admin/framework/bootstrap.less b/app/assets/stylesheets/admin/framework/bootstrap.less new file mode 100755 index 0000000..dc5d99e --- /dev/null +++ b/app/assets/stylesheets/admin/framework/bootstrap.less @@ -0,0 +1,67 @@ +/*! + * Bootstrap v2.3.2 + * + * Copyright 2012 Twitter, Inc + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Designed and built with all the love in the world @twitter by @mdo and @fat. + */ + +// Core variables and mixins +@import "variables.less"; // Modify this for custom colors, font-sizes, etc +@import "mixins.less"; + +// CSS Reset +@import "reset.less"; + +// Grid system and page structure +@import "scaffolding.less"; +@import "grid.less"; +@import "layouts.less"; + +// Base CSS +@import "type.less"; +@import "code.less"; +@import "formt.less"; +@import "forms.less"; +@import "tables.less"; + +// Components: common +@import "sprites.less"; +@import "dropdowns.less"; +@import "wells.less"; +@import "component-animations.less"; +@import "close.less"; + +// Components: Buttons & Alerts +@import "buttons.less"; +@import "button-groups.less"; +@import "alerts.less"; // Note: alerts share common CSS with buttons and thus have styles in buttons.less + +// Components: Nav +@import "navs.less"; +@import "navbar.less"; +@import "breadcrumbs.less"; +@import "pagination.less"; +@import "pager.less"; + +// Components: Popovers +@import "modals.less"; +@import "tooltip.less"; +@import "popovers.less"; + +// Components: Misc +@import "thumbnails.less"; +@import "media.less"; +@import "labels-badges.less"; +@import "progress-bars.less"; +@import "accordion.less"; +@import "carousel.less"; +@import "hero-unit.less"; + +// Utility classes +@import "utilities.less"; // Has to be last to override when necessary + + +@import "slider.less"; diff --git a/app/assets/stylesheets/admin/framework/breadcrumbs.less b/app/assets/stylesheets/admin/framework/breadcrumbs.less new file mode 100755 index 0000000..f753df6 --- /dev/null +++ b/app/assets/stylesheets/admin/framework/breadcrumbs.less @@ -0,0 +1,24 @@ +// +// Breadcrumbs +// -------------------------------------------------- + + +.breadcrumb { + padding: 8px 15px; + margin: 0 0 @baseLineHeight; + list-style: none; + background-color: #f5f5f5; + .border-radius(@baseBorderRadius); + > li { + display: inline-block; + .ie7-inline-block(); + text-shadow: 0 1px 0 @white; + > .divider { + padding: 0 5px; + color: #ccc; + } + } + > .active { + color: @grayLight; + } +} diff --git a/app/assets/stylesheets/admin/framework/button-groups.less b/app/assets/stylesheets/admin/framework/button-groups.less new file mode 100755 index 0000000..55cdc60 --- /dev/null +++ b/app/assets/stylesheets/admin/framework/button-groups.less @@ -0,0 +1,229 @@ +// +// Button groups +// -------------------------------------------------- + + +// Make the div behave like a button +.btn-group { + position: relative; + display: inline-block; + .ie7-inline-block(); + font-size: 0; // remove as part 1 of font-size inline-block hack + vertical-align: middle; // match .btn alignment given font-size hack above + white-space: nowrap; // prevent buttons from wrapping when in tight spaces (e.g., the table on the tests page) + .ie7-restore-left-whitespace(); +} + +// Space out series of button groups +.btn-group + .btn-group { + margin-left: 5px; +} + +// Optional: Group multiple button groups together for a toolbar +.btn-toolbar { + font-size: 0; // Hack to remove whitespace that results from using inline-block + margin-top: @baseLineHeight / 2; + margin-bottom: @baseLineHeight / 2; + > .btn + .btn, + > .btn-group + .btn, + > .btn + .btn-group { + margin-left: 5px; + } +} + +// Float them, remove border radius, then re-add to first and last elements +.btn-group > .btn { + position: relative; + .border-radius(0); +} +.btn-group > .btn + .btn { + margin-left: -1px; +} +.btn-group > .btn, +.btn-group > .dropdown-menu, +.btn-group > .popover { + font-size: @baseFontSize; // redeclare as part 2 of font-size inline-block hack +} + +// Reset fonts for other sizes +.btn-group > .btn-mini { + font-size: @fontSizeMini; +} +.btn-group > .btn-small { + font-size: @fontSizeSmall; +} +.btn-group > .btn-large { + font-size: @fontSizeLarge; +} + +// Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match +.btn-group > .btn:first-child { + margin-left: 0; + .border-top-left-radius(@baseBorderRadius); + .border-bottom-left-radius(@baseBorderRadius); +} +// Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it +.btn-group > .btn:last-child, +.btn-group > .dropdown-toggle { + .border-top-right-radius(@baseBorderRadius); + .border-bottom-right-radius(@baseBorderRadius); +} +// Reset corners for large buttons +.btn-group > .btn.large:first-child { + margin-left: 0; + .border-top-left-radius(@borderRadiusLarge); + .border-bottom-left-radius(@borderRadiusLarge); +} +.btn-group > .btn.large:last-child, +.btn-group > .large.dropdown-toggle { + .border-top-right-radius(@borderRadiusLarge); + .border-bottom-right-radius(@borderRadiusLarge); +} + +// On hover/focus/active, bring the proper btn to front +.btn-group > .btn:hover, +.btn-group > .btn:focus, +.btn-group > .btn:active, +.btn-group > .btn.active { + z-index: 2; +} + +// On active and open, don't show outline +.btn-group .dropdown-toggle:active, +.btn-group.open .dropdown-toggle { + outline: 0; +} + + + +// Split button dropdowns +// ---------------------- + +// Give the line between buttons some depth +.btn-group > .btn + .dropdown-toggle { + padding-left: 8px; + padding-right: 8px; + .box-shadow(~"inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05)"); + *padding-top: 5px; + *padding-bottom: 5px; +} +.btn-group > .btn-mini + .dropdown-toggle { + padding-left: 5px; + padding-right: 5px; + *padding-top: 2px; + *padding-bottom: 2px; +} +.btn-group > .btn-small + .dropdown-toggle { + *padding-top: 5px; + *padding-bottom: 4px; +} +.btn-group > .btn-large + .dropdown-toggle { + padding-left: 12px; + padding-right: 12px; + *padding-top: 7px; + *padding-bottom: 7px; +} + +.btn-group.open { + + // The clickable button for toggling the menu + // Remove the gradient and set the same inset shadow as the :active state + .dropdown-toggle { + background-image: none; + .box-shadow(~"inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05)"); + } + + // Keep the hover's background when dropdown is open + .btn.dropdown-toggle { + background-color: @btnBackgroundHighlight; + } + .btn-primary.dropdown-toggle { + background-color: @btnPrimaryBackgroundHighlight; + } + .btn-warning.dropdown-toggle { + background-color: @btnWarningBackgroundHighlight; + } + .btn-danger.dropdown-toggle { + background-color: @btnDangerBackgroundHighlight; + } + .btn-success.dropdown-toggle { + background-color: @btnSuccessBackgroundHighlight; + } + .btn-info.dropdown-toggle { + background-color: @btnInfoBackgroundHighlight; + } + .btn-inverse.dropdown-toggle { + background-color: @btnInverseBackgroundHighlight; + } +} + + +// Reposition the caret +.btn .caret { + margin-top: 8px; + margin-left: 0; +} +// Carets in other button sizes +.btn-large .caret { + margin-top: 6px; +} +.btn-large .caret { + border-left-width: 5px; + border-right-width: 5px; + border-top-width: 5px; +} +.btn-mini .caret, +.btn-small .caret { + margin-top: 8px; +} +// Upside down carets for .dropup +.dropup .btn-large .caret { + border-bottom-width: 5px; +} + + + +// Account for other colors +.btn-primary, +.btn-warning, +.btn-danger, +.btn-info, +.btn-success, +.btn-inverse { + .caret { + border-top-color: @white; + border-bottom-color: @white; + } +} + + + +// Vertical button groups +// ---------------------- + +.btn-group-vertical { + display: inline-block; // makes buttons only take up the width they need + .ie7-inline-block(); +} +.btn-group-vertical > .btn { + display: block; + float: none; + max-width: 100%; + .border-radius(0); +} +.btn-group-vertical > .btn + .btn { + margin-left: 0; + margin-top: -1px; +} +.btn-group-vertical > .btn:first-child { + .border-radius(@baseBorderRadius @baseBorderRadius 0 0); +} +.btn-group-vertical > .btn:last-child { + .border-radius(0 0 @baseBorderRadius @baseBorderRadius); +} +.btn-group-vertical > .btn-large:first-child { + .border-radius(@borderRadiusLarge @borderRadiusLarge 0 0); +} +.btn-group-vertical > .btn-large:last-child { + .border-radius(0 0 @borderRadiusLarge @borderRadiusLarge); +} diff --git a/app/assets/stylesheets/admin/framework/buttons.less b/app/assets/stylesheets/admin/framework/buttons.less new file mode 100755 index 0000000..4cd4d86 --- /dev/null +++ b/app/assets/stylesheets/admin/framework/buttons.less @@ -0,0 +1,228 @@ +// +// Buttons +// -------------------------------------------------- + + +// Base styles +// -------------------------------------------------- + +// Core +.btn { + display: inline-block; + .ie7-inline-block(); + padding: 4px 12px; + margin-bottom: 0; // For input.btn + font-size: @baseFontSize; + line-height: @baseLineHeight; + text-align: center; + vertical-align: middle; + cursor: pointer; + .buttonBackground(@btnBackground, @btnBackgroundHighlight, @grayDark, 0 1px 1px rgba(255,255,255,.75)); + border: 1px solid @btnBorder; + *border: 0; // Remove the border to prevent IE7's black border on input:focus + border-bottom-color: darken(@btnBorder, 10%); + .border-radius(@baseBorderRadius); + .ie7-restore-left-whitespace(); // Give IE7 some love + .box-shadow(~"inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05)"); + + // Hover/focus state + &:hover, + &:focus { + color: @grayDark; + text-decoration: none; + background-position: 0 -15px; + + // transition is only when going to hover/focus, otherwise the background + // behind the gradient (there for IE<=9 fallback) gets mismatched + .transition(background-position .1s linear); + } + + // Focus state for keyboard and accessibility + &:focus { + .tab-focus(); + } + + // Active state + &.active, + &:active { + background-image: none; + outline: 0; + .box-shadow(~"inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05)"); + } + + // Disabled state + &.disabled, + &[disabled] { + cursor: default; + background-image: none; + .opacity(65); + .box-shadow(none); + } + +} + + + +// Button Sizes +// -------------------------------------------------- + +// Large +.btn-large { + padding: @paddingLarge; + font-size: @fontSizeLarge; + .border-radius(@borderRadiusLarge); +} +.btn-large [class^="icon-"], +.btn-large [class*=" icon-"] { + margin-top: 4px; +} + +// Small +.btn-small { + padding: @paddingSmall; + font-size: @fontSizeSmall; + .border-radius(@borderRadiusSmall); +} +.btn-small [class^="icon-"], +.btn-small [class*=" icon-"] { + margin-top: 0; +} +.btn-mini [class^="icon-"], +.btn-mini [class*=" icon-"] { + margin-top: -1px; +} + +// Mini +.btn-mini { + padding: @paddingMini; + font-size: @fontSizeMini; + .border-radius(@borderRadiusSmall); +} + + +// Block button +// ------------------------- + +.btn-block { + display: block; + width: 100%; + padding-left: 0; + padding-right: 0; + .box-sizing(border-box); +} + +// Vertically space out multiple block buttons +.btn-block + .btn-block { + margin-top: 5px; +} + +// Specificity overrides +input[type="submit"], +input[type="reset"], +input[type="button"] { + &.btn-block { + width: 100%; + } +} + + + +// Alternate buttons +// -------------------------------------------------- + +// Provide *some* extra contrast for those who can get it +.btn-primary.active, +.btn-warning.active, +.btn-danger.active, +.btn-success.active, +.btn-info.active, +.btn-inverse.active { + color: rgba(255,255,255,.75); +} + +// Set the backgrounds +// ------------------------- +.btn-primary { + .buttonBackground(@btnPrimaryBackground, @btnPrimaryBackgroundHighlight); +} +// Warning appears are orange +.btn-warning { + .buttonBackground(@btnWarningBackground, @btnWarningBackgroundHighlight); +} +// Danger and error appear as red +.btn-danger { + .buttonBackground(@btnDangerBackground, @btnDangerBackgroundHighlight); +} +// Success appears as green +.btn-success { + .buttonBackground(@btnSuccessBackground, @btnSuccessBackgroundHighlight); +} +// Info appears as a neutral blue +.btn-info { + .buttonBackground(@btnInfoBackground, @btnInfoBackgroundHighlight); +} +// Inverse appears as dark gray +.btn-inverse { + .buttonBackground(@btnInverseBackground, @btnInverseBackgroundHighlight); +} + + +// Cross-browser Jank +// -------------------------------------------------- + +button.btn, +input[type="submit"].btn { + + // Firefox 3.6 only I believe + &::-moz-focus-inner { + padding: 0; + border: 0; + } + + // IE7 has some default padding on button controls + *padding-top: 3px; + *padding-bottom: 3px; + + &.btn-large { + *padding-top: 7px; + *padding-bottom: 7px; + } + &.btn-small { + *padding-top: 3px; + *padding-bottom: 3px; + } + &.btn-mini { + *padding-top: 1px; + *padding-bottom: 1px; + } +} + + +// Link buttons +// -------------------------------------------------- + +// Make a button look and behave like a link +.btn-link, +.btn-link:active, +.btn-link[disabled] { + background-color: transparent; + background-image: none; + .box-shadow(none); +} +.btn-link { + border-color: transparent; + cursor: pointer; + color: @linkColor; + .border-radius(0); +} +.btn-link:hover, +.btn-link:focus { + color: @linkColorHover; + text-decoration: underline; + background-color: transparent; +} +.btn-link[disabled]:hover, +.btn-link[disabled]:focus { + color: @grayDark; + text-decoration: none; +} diff --git a/app/assets/stylesheets/admin/framework/carousel.less b/app/assets/stylesheets/admin/framework/carousel.less new file mode 100755 index 0000000..55bc050 --- /dev/null +++ b/app/assets/stylesheets/admin/framework/carousel.less @@ -0,0 +1,158 @@ +// +// Carousel +// -------------------------------------------------- + + +.carousel { + position: relative; + margin-bottom: @baseLineHeight; + line-height: 1; +} + +.carousel-inner { + overflow: hidden; + width: 100%; + position: relative; +} + +.carousel-inner { + + > .item { + display: none; + position: relative; + .transition(.6s ease-in-out left); + + // Account for jankitude on images + > img, + > a > img { + display: block; + line-height: 1; + } + } + + > .active, + > .next, + > .prev { display: block; } + + > .active { + left: 0; + } + + > .next, + > .prev { + position: absolute; + top: 0; + width: 100%; + } + + > .next { + left: 100%; + } + > .prev { + left: -100%; + } + > .next.left, + > .prev.right { + left: 0; + } + + > .active.left { + left: -100%; + } + > .active.right { + left: 100%; + } + +} + +// Left/right controls for nav +// --------------------------- + +.carousel-control { + position: absolute; + top: 40%; + left: 15px; + width: 40px; + height: 40px; + margin-top: -20px; + font-size: 60px; + font-weight: 100; + line-height: 30px; + color: @white; + text-align: center; + background: @grayDarker; + border: 3px solid @white; + .border-radius(23px); + .opacity(50); + + // we can't have this transition here + // because webkit cancels the carousel + // animation if you trip this while + // in the middle of another animation + // ;_; + // .transition(opacity .2s linear); + + // Reposition the right one + &.right { + left: auto; + right: 15px; + } + + // Hover/focus state + &:hover, + &:focus { + color: @white; + text-decoration: none; + .opacity(90); + } +} + +// Carousel indicator pips +// ----------------------------- +.carousel-indicators { + position: absolute; + top: 15px; + right: 15px; + z-index: 5; + margin: 0; + list-style: none; + + li { + display: block; + float: left; + width: 10px; + height: 10px; + margin-left: 5px; + text-indent: -999px; + background-color: #ccc; + background-color: rgba(255,255,255,.25); + border-radius: 5px; + } + .active { + background-color: #fff; + } +} + +// Caption for text below images +// ----------------------------- + +.carousel-caption { + position: absolute; + left: 0; + right: 0; + bottom: 0; + padding: 15px; + background: @grayDark; + background: rgba(0,0,0,.75); +} +.carousel-caption h4, +.carousel-caption p { + color: @white; + line-height: @baseLineHeight; +} +.carousel-caption h4 { + margin: 0 0 5px; +} +.carousel-caption p { + margin-bottom: 0; +} diff --git a/app/assets/stylesheets/admin/framework/close.less b/app/assets/stylesheets/admin/framework/close.less new file mode 100755 index 0000000..4c626bd --- /dev/null +++ b/app/assets/stylesheets/admin/framework/close.less @@ -0,0 +1,32 @@ +// +// Close icons +// -------------------------------------------------- + + +.close { + float: right; + font-size: 20px; + font-weight: bold; + line-height: @baseLineHeight; + color: @black; + text-shadow: 0 1px 0 rgba(255,255,255,1); + .opacity(20); + &:hover, + &:focus { + color: @black; + text-decoration: none; + cursor: pointer; + .opacity(40); + } +} + +// Additional properties for button version +// iOS requires the button element instead of an anchor tag. +// If you want the anchor version, it requires `href="#"`. +button.close { + padding: 0; + cursor: pointer; + background: transparent; + border: 0; + -webkit-appearance: none; +} \ No newline at end of file diff --git a/app/assets/stylesheets/admin/framework/code.less b/app/assets/stylesheets/admin/framework/code.less new file mode 100755 index 0000000..266a926 --- /dev/null +++ b/app/assets/stylesheets/admin/framework/code.less @@ -0,0 +1,61 @@ +// +// Code (inline and blocK) +// -------------------------------------------------- + + +// Inline and block code styles +code, +pre { + padding: 0 3px 2px; + #font > #family > .monospace; + font-size: @baseFontSize - 2; + color: @grayDark; + .border-radius(3px); +} + +// Inline code +code { + padding: 2px 4px; + color: #d14; + background-color: #f7f7f9; + border: 1px solid #e1e1e8; + white-space: nowrap; +} + +// Blocks of code +pre { + display: block; + padding: (@baseLineHeight - 1) / 2; + margin: 0 0 @baseLineHeight / 2; + font-size: @baseFontSize - 1; // 14px to 13px + line-height: @baseLineHeight; + word-break: break-all; + word-wrap: break-word; + white-space: pre; + white-space: pre-wrap; + background-color: #f5f5f5; + border: 1px solid #ccc; // fallback for IE7-8 + border: 1px solid rgba(0,0,0,.15); + .border-radius(@baseBorderRadius); + + // Make prettyprint styles more spaced out for readability + &.prettyprint { + margin-bottom: @baseLineHeight; + } + + // Account for some code outputs that place code tags in pre tags + code { + padding: 0; + color: inherit; + white-space: pre; + white-space: pre-wrap; + background-color: transparent; + border: 0; + } +} + +// Enable scrollable blocks of code +.pre-scrollable { + max-height: 340px; + overflow-y: scroll; +} \ No newline at end of file diff --git a/app/assets/stylesheets/admin/framework/component-animations.less b/app/assets/stylesheets/admin/framework/component-animations.less new file mode 100755 index 0000000..d614263 --- /dev/null +++ b/app/assets/stylesheets/admin/framework/component-animations.less @@ -0,0 +1,22 @@ +// +// Component animations +// -------------------------------------------------- + + +.fade { + opacity: 0; + .transition(opacity .15s linear); + &.in { + opacity: 1; + } +} + +.collapse { + position: relative; + height: 0; + overflow: hidden; + .transition(height .35s ease); + &.in { + height: auto; + } +} diff --git a/app/assets/stylesheets/admin/framework/dropdowns.less b/app/assets/stylesheets/admin/framework/dropdowns.less new file mode 100755 index 0000000..9e47b47 --- /dev/null +++ b/app/assets/stylesheets/admin/framework/dropdowns.less @@ -0,0 +1,248 @@ +// +// Dropdown menus +// -------------------------------------------------- + + +// Use the .menu class on any
          • element within the topbar or ul.tabs and you'll get some superfancy dropdowns +.dropup, +.dropdown { + position: relative; +} +.dropdown-toggle { + // The caret makes the toggle a bit too tall in IE7 + *margin-bottom: -3px; +} +.dropdown-toggle:active, +.open .dropdown-toggle { + outline: 0; +} + +// Dropdown arrow/caret +// -------------------- +.caret { + display: inline-block; + width: 0; + height: 0; + vertical-align: top; + border-top: 4px solid @black; + border-right: 4px solid transparent; + border-left: 4px solid transparent; + content: ""; +} + +// Place the caret +.dropdown .caret { + margin-top: 8px; + margin-left: 2px; +} + +// The dropdown menu (ul) +// ---------------------- +.dropdown-menu { + position: absolute; + top: 100%; + left: 0; + z-index: @zindexDropdown; + display: none; // none by default, but block on "open" of the menu + float: left; + min-width: 160px; + padding: 5px 0; + margin: 2px 0 0; // override default ul + list-style: none; + background-color: @dropdownBackground; + border: 1px solid #ccc; // Fallback for IE7-8 + border: 1px solid @dropdownBorder; + *border-right-width: 2px; + *border-bottom-width: 2px; + .border-radius(6px); + .box-shadow(0 5px 10px rgba(0,0,0,.2)); + -webkit-background-clip: padding-box; + -moz-background-clip: padding; + background-clip: padding-box; + + // Aligns the dropdown menu to right + &.pull-right { + right: 0; + left: auto; + } + + // Dividers (basically an hr) within the dropdown + .divider { + .nav-divider(@dropdownDividerTop, @dropdownDividerBottom); + } + + // Links within the dropdown menu + > li > a { + display: block; + padding: 3px 20px; + clear: both; + font-weight: normal; + line-height: @baseLineHeight; + color: @dropdownLinkColor; + white-space: nowrap; + } +} + +// Hover/Focus state +// ----------- +.dropdown-menu > li > a:hover, +.dropdown-menu > li > a:focus, +.dropdown-submenu:hover > a, +.dropdown-submenu:focus > a { + text-decoration: none; + color: @dropdownLinkColorHover; + #gradient > .vertical(@dropdownLinkBackgroundHover, darken(@dropdownLinkBackgroundHover, 5%)); +} + +// Active state +// ------------ +.dropdown-menu > .active > a, +.dropdown-menu > .active > a:hover, +.dropdown-menu > .active > a:focus { + color: @dropdownLinkColorActive; + text-decoration: none; + outline: 0; + #gradient > .vertical(@dropdownLinkBackgroundActive, darken(@dropdownLinkBackgroundActive, 5%)); +} + +// Disabled state +// -------------- +// Gray out text and ensure the hover/focus state remains gray +.dropdown-menu > .disabled > a, +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { + color: @grayLight; +} +// Nuke hover/focus effects +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { + text-decoration: none; + background-color: transparent; + background-image: none; // Remove CSS gradient + .reset-filter(); + cursor: default; +} + +// Open state for the dropdown +// --------------------------- +.open { + // IE7's z-index only goes to the nearest positioned ancestor, which would + // make the menu appear below buttons that appeared later on the page + *z-index: @zindexDropdown; + + & > .dropdown-menu { + display: block; + } +} + +// Backdrop to catch body clicks on mobile, etc. +// --------------------------- +.dropdown-backdrop { + position: fixed; + left: 0; + right: 0; + bottom: 0; + top: 0; + z-index: @zindexDropdown - 10; +} + +// Right aligned dropdowns +// --------------------------- +.pull-right > .dropdown-menu { + right: 0; + left: auto; +} + +// Allow for dropdowns to go bottom up (aka, dropup-menu) +// ------------------------------------------------------ +// Just add .dropup after the standard .dropdown class and you're set, bro. +// TODO: abstract this so that the navbar fixed styles are not placed here? +.dropup, +.navbar-fixed-bottom .dropdown { + // Reverse the caret + .caret { + border-top: 0; + border-bottom: 4px solid @black; + content: ""; + } + // Different positioning for bottom up menu + .dropdown-menu { + top: auto; + bottom: 100%; + margin-bottom: 1px; + } +} + +// Sub menus +// --------------------------- +.dropdown-submenu { + position: relative; +} +// Default dropdowns +.dropdown-submenu > .dropdown-menu { + top: 0; + left: 100%; + margin-top: -6px; + margin-left: -1px; + .border-radius(0 6px 6px 6px); +} +.dropdown-submenu:hover > .dropdown-menu { + display: block; +} + +// Dropups +.dropup .dropdown-submenu > .dropdown-menu { + top: auto; + bottom: 0; + margin-top: 0; + margin-bottom: -2px; + .border-radius(5px 5px 5px 0); +} + +// Caret to indicate there is a submenu +.dropdown-submenu > a:after { + display: block; + content: " "; + float: right; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; + border-width: 5px 0 5px 5px; + border-left-color: darken(@dropdownBackground, 20%); + margin-top: 5px; + margin-right: -10px; +} +.dropdown-submenu:hover > a:after { + border-left-color: @dropdownLinkColorHover; +} + +// Left aligned submenus +.dropdown-submenu.pull-left { + // Undo the float + // Yes, this is awkward since .pull-left adds a float, but it sticks to our conventions elsewhere. + float: none; + + // Positioning the submenu + > .dropdown-menu { + left: -100%; + margin-left: 10px; + .border-radius(6px 0 6px 6px); + } +} + +// Tweak nav headers +// ----------------- +// Increase padding from 15px to 20px on sides +.dropdown .dropdown-menu .nav-header { + padding-left: 20px; + padding-right: 20px; +} + +// Typeahead +// --------- +.typeahead { + z-index: 1051; + margin-top: 2px; // give it some space to breathe + .border-radius(@baseBorderRadius); +} diff --git a/app/assets/stylesheets/admin/framework/forms.less b/app/assets/stylesheets/admin/framework/forms.less new file mode 100755 index 0000000..b995858 --- /dev/null +++ b/app/assets/stylesheets/admin/framework/forms.less @@ -0,0 +1,695 @@ +// +// Forms +// -------------------------------------------------- + + +// GENERAL STYLES +// -------------- + +// Make all forms have space below them +form { + margin: 0 0 @baseLineHeight; +} + +fieldset { + padding: 0; + margin: 0; + border: 0; +} + +// Groups of fields with labels on top (legends) +legend { + display: block; +// width: 100%; + padding: 0; + margin-bottom: @baseLineHeight; + font-size: @baseFontSize * 1.5; + line-height: @baseLineHeight * 2; + color: @grayDark; + border: 0; + border-bottom: 1px solid #e5e5e5; + + // Small + small { + font-size: @baseLineHeight * .75; + color: @grayLight; + } +} + +// Set font for forms +label, +input, +button, +select, +textarea { + #font > .shorthand(@baseFontSize,normal,@baseLineHeight); // Set size, weight, line-height here +} +input, +button, +select, +textarea { + font-family: @baseFontFamily; // And only set font-family here for those that need it (note the missing label element) +} + +// Identify controls by their labels +label { + display: block; + margin-bottom: 5px; +} + +// Form controls +// ------------------------- + +// Shared size and type resets +select, +textarea, +input[type="text"], +input[type="password"], +input[type="datetime"], +input[type="datetime-local"], +input[type="date"], +input[type="month"], +input[type="time"], +input[type="week"], +input[type="number"], +input[type="email"], +input[type="url"], +input[type="search"], +input[type="tel"], +input[type="color"], +.input-style, +.uneditable-input { + display: inline-block; + height: @baseLineHeight; + padding: 4px 6px; + margin-bottom: @baseLineHeight / 2; + font-size: @baseFontSize; + line-height: @baseLineHeight; + color: @gray; + .border-radius(@inputBorderRadius); + vertical-align: middle; +} + +// Reset appearance properties for textual inputs and textarea +// Declare width for legacy (can't be on input[type=*] selectors or it's too specific) +input, +textarea, +.uneditable-input { +// width: 206px; // plus 12px padding and 2px border +} +// Reset height since textareas have rows +textarea { + height: auto; +} +// Everything else +textarea, +input[type="text"], +input[type="password"], +input[type="datetime"], +input[type="datetime-local"], +input[type="date"], +input[type="month"], +input[type="time"], +input[type="week"], +input[type="number"], +input[type="email"], +input[type="url"], +input[type="search"], +input[type="tel"], +input[type="color"], +.input-style, +.uneditable-input { + background-color: @inputBackground; + border: 1px solid @inputBorder; + .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); + .transition(~"border linear .2s, box-shadow linear .2s"); + + // Focus state + &:focus { + border-color: rgba(82,168,236,.8); + outline: 0; + outline: thin dotted \9; /* IE6-9 */ + .box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6)"); + } +} + +// Position radios and checkboxes better +input[type="radio"], +input[type="checkbox"] { + margin: 4px 0 0; + *margin-top: 0; /* IE7 */ + margin-top: 1px \9; /* IE8-9 */ + line-height: normal; +} + +// Reset width of input images, buttons, radios, checkboxes +input[type="file"], +input[type="image"], +input[type="submit"], +input[type="reset"], +input[type="button"], +input[type="radio"], +input[type="checkbox"] { + // width: auto; // Override of generic input selector +} + +// Set the height of select and file controls to match text inputs +select, +input[type="file"] { + height: @inputHeight; /* In IE7, the height of the select element cannot be changed by height, only font-size */ + *margin-top: 4px; /* For IE7, add top margin to align select with labels */ + line-height: @inputHeight; +} + +// Make select elements obey height by applying a border +select { + // width: 220px; // default input width + 10px of padding that doesn't get applied + border: 1px solid @inputBorder; + background-color: @inputBackground; // Chrome on Linux and Mobile Safari need background-color +} + +// Make multiple select elements height not fixed +select[multiple], +select[size] { + height: auto; +} + +// Focus for select, file, radio, and checkbox +select:focus, +input[type="file"]:focus, +input[type="radio"]:focus, +input[type="checkbox"]:focus { + .tab-focus(); +} + + +// Uneditable inputs +// ------------------------- + +// Make uneditable inputs look inactive +.uneditable-input, +.uneditable-textarea { + color: @grayLight; + background-color: darken(@inputBackground, 1%); + border-color: @inputBorder; + .box-shadow(inset 0 1px 2px rgba(0,0,0,.025)); + cursor: not-allowed; +} + +// For text that needs to appear as an input but should not be an input +.uneditable-input { + overflow: hidden; // prevent text from wrapping, but still cut it off like an input does + white-space: nowrap; +} + +// Make uneditable textareas behave like a textarea +.uneditable-textarea { + width: auto; + height: auto; +} + + +// Placeholder +// ------------------------- + +// Placeholder text gets special styles because when browsers invalidate entire lines if it doesn't understand a selector +input, +textarea { + .placeholder(); +} + + +// CHECKBOXES & RADIOS +// ------------------- + +// Indent the labels to position radios/checkboxes as hanging +.radio, +.checkbox { + min-height: @baseLineHeight; // clear the floating input if there is no label text + padding-left: 20px; +} +.radio input[type="radio"], +.checkbox input[type="checkbox"] { + float: left; + margin-left: -20px; +} + +// Move the options list down to align with labels +.controls > .radio:first-child, +.controls > .checkbox:first-child { + padding-top: 5px; // has to be padding because margin collaspes +} + +// Radios and checkboxes on same line +// TODO v3: Convert .inline to .control-inline +.radio.inline, +.checkbox.inline { + display: inline-block; + padding-top: 5px; + margin-bottom: 0; + vertical-align: middle; +} +.radio.inline + .radio.inline, +.checkbox.inline + .checkbox.inline { + margin-left: 10px; // space out consecutive inline controls +} + + + +// INPUT SIZES +// ----------- + +// General classes for quick sizes +/* +.input-mini { width: 60px; } +.input-small { width: 90px; } +.input-medium { width: 150px; } +.input-large { width: 210px; } +.input-xlarge { width: 270px; } +.input-xxlarge { width: 530px; } + +*/ + +// Grid style input sizes +input[class*="span"], +select[class*="span"], +textarea[class*="span"], +.uneditable-input[class*="span"], +// Redeclare since the fluid row class is more specific +.row-fluid input[class*="span"], +.row-fluid select[class*="span"], +.row-fluid textarea[class*="span"], +.row-fluid .uneditable-input[class*="span"] { + float: none; + margin-left: 0; +} +// Ensure input-prepend/append never wraps +.input-append input[class*="span"], +.input-append .uneditable-input[class*="span"], +.input-prepend input[class*="span"], +.input-prepend .uneditable-input[class*="span"], +.row-fluid input[class*="span"], +.row-fluid select[class*="span"], +.row-fluid textarea[class*="span"], +.row-fluid .uneditable-input[class*="span"], +.row-fluid .input-prepend [class*="span"], +.row-fluid .input-append [class*="span"] { + display: inline-block; +} + + + +// GRID SIZING FOR INPUTS +// ---------------------- + +// Grid sizes +#grid > .input(@gridColumnWidth, @gridGutterWidth); + +// Control row for multiple inputs per line +.controls-row { + .clearfix(); // Clear the float from controls +} + +// Float to collapse white-space for proper grid alignment +.controls-row [class*="span"], +// Redeclare the fluid grid collapse since we undo the float for inputs +.row-fluid .controls-row [class*="span"] { + float: left; +} +// Explicity set top padding on all checkboxes/radios, not just first-child +.controls-row .checkbox[class*="span"], +.controls-row .radio[class*="span"] { + padding-top: 5px; +} + + + + +// DISABLED STATE +// -------------- + +// Disabled and read-only inputs +input[disabled], +select[disabled], +textarea[disabled], +input[readonly], +select[readonly], +textarea[readonly] { + cursor: not-allowed; + background-color: @inputDisabledBackground; +} +// Explicitly reset the colors here +input[type="radio"][disabled], +input[type="checkbox"][disabled], +input[type="radio"][readonly], +input[type="checkbox"][readonly] { + background-color: transparent; +} + + + + +// FORM FIELD FEEDBACK STATES +// -------------------------- + +// Warning +.control-group.warning { + .formFieldState(@warningText, @warningText, @warningBackground); +} +// Error +.control-group.error { + .formFieldState(@errorText, @errorText, @errorBackground); +} +// Success +.control-group.success { + .formFieldState(@successText, @successText, @successBackground); +} +// Success +.control-group.info { + .formFieldState(@infoText, @infoText, @infoBackground); +} + +// HTML5 invalid states +// Shares styles with the .control-group.error above +input:focus:invalid, +textarea:focus:invalid, +select:focus:invalid { + color: #b94a48; + border-color: #ee5f5b; + &:focus { + border-color: darken(#ee5f5b, 10%); + @shadow: 0 0 6px lighten(#ee5f5b, 20%); + .box-shadow(@shadow); + } +} + + + +// FORM ACTIONS +// ------------ + +.form-actions { + padding: (@baseLineHeight - 1) 20px @baseLineHeight; + margin-top: @baseLineHeight; + margin-bottom: @baseLineHeight; + background-color: @formActionsBackground; + border-top: 1px solid #e5e5e5; + .clearfix(); // Adding clearfix to allow for .pull-right button containers +} + + + +// HELP TEXT +// --------- + +.help-block, +.help-inline { + color: lighten(@textColor, 15%); // lighten the text some for contrast +} + +.help-block { + display: block; // account for any element using help-block + margin-bottom: @baseLineHeight / 2; +} + +.help-inline { + display: inline-block; + .ie7-inline-block(); + vertical-align: middle; + padding-left: 5px; +} + + + +// INPUT GROUPS +// ------------ + +// Allow us to put symbols and text within the input field for a cleaner look +.input-append, +.input-prepend { + display: inline-block; + margin-bottom: @baseLineHeight / 2; + vertical-align: middle; + font-size: 0; // white space collapse hack + white-space: nowrap; // Prevent span and input from separating + + // Reset the white space collapse hack + input, + select, + .uneditable-input, + .dropdown-menu, + .popover { + font-size: @baseFontSize; + } + + input, + select, + .uneditable-input { + position: relative; // placed here by default so that on :focus we can place the input above the .add-on for full border and box-shadow goodness + margin-bottom: 0; // prevent bottom margin from screwing up alignment in stacked forms + *margin-left: 0; + vertical-align: top; + .border-radius(0 @inputBorderRadius @inputBorderRadius 0); + // Make input on top when focused so blue border and shadow always show + &:focus { + z-index: 2; + } + } + .add-on { + display: inline-block; + width: auto; + height: @baseLineHeight; + min-width: 16px; + padding: 4px 5px; + font-size: @baseFontSize; + font-weight: normal; + line-height: @baseLineHeight; + text-align: center; + text-shadow: 0 1px 0 @white; + background-color: @grayLighter; + border: 1px solid #ccc; + } + .add-on, + .btn, + .btn-group > .dropdown-toggle { + vertical-align: top; + .border-radius(0); + } + .active { + background-color: lighten(@green, 30); + border-color: @green; + } +} + +.input-prepend { + .add-on, + .btn { + margin-right: -1px; + } + .add-on:first-child, + .btn:first-child { + // FYI, `.btn:first-child` accounts for a button group that's prepended + .border-radius(@inputBorderRadius 0 0 @inputBorderRadius); + } +} + +.input-append { + input, + select, + .uneditable-input { + .border-radius(@inputBorderRadius 0 0 @inputBorderRadius); + + .btn-group .btn:last-child { + .border-radius(0 @inputBorderRadius @inputBorderRadius 0); + } + } + .add-on, + .btn, + .btn-group { + margin-left: -1px; + } + .add-on:last-child, + .btn:last-child, + .btn-group:last-child > .dropdown-toggle { + .border-radius(0 @inputBorderRadius @inputBorderRadius 0); + } +} + +// Remove all border-radius for inputs with both prepend and append +.input-prepend.input-append { + input, + select, + .uneditable-input { + .border-radius(0); + + .btn-group .btn { + .border-radius(0 @inputBorderRadius @inputBorderRadius 0); + } + } + .add-on:first-child, + .btn:first-child { + margin-right: -1px; + .border-radius(@inputBorderRadius 0 0 @inputBorderRadius); + } + .add-on:last-child, + .btn:last-child { + margin-left: -1px; + .border-radius(0 @inputBorderRadius @inputBorderRadius 0); + } + .btn-group:first-child { + margin-left: 0; + } +} + + + + +// SEARCH FORM +// ----------- + +input.search-query { + padding-right: 14px; + padding-right: 4px \9; + padding-left: 14px; + padding-left: 4px \9; /* IE7-8 doesn't have border-radius, so don't indent the padding */ + margin-bottom: 0; // Remove the default margin on all inputs + .border-radius(15px); +} + +/* Allow for input prepend/append in search forms */ +.form-search .input-append .search-query, +.form-search .input-prepend .search-query { + .border-radius(0); // Override due to specificity +} +.form-search .input-append .search-query { + .border-radius(14px 0 0 14px); +} +.form-search .input-append .btn { + .border-radius(0 14px 14px 0); +} +.form-search .input-prepend .search-query { + .border-radius(0 14px 14px 0); +} +.form-search .input-prepend .btn { + .border-radius(14px 0 0 14px); +} + + + + +// HORIZONTAL & VERTICAL FORMS +// --------------------------- + +// Common properties +// ----------------- + +.form-search, +.form-inline, +.form-horizontal { + input, + textarea, + select, + .help-inline, + .uneditable-input, + .input-prepend, + .input-append { + display: inline-block; + .ie7-inline-block(); + margin-bottom: 0; + vertical-align: middle; + } + // Re-hide hidden elements due to specifity + .hide { + display: none; + } +} +.form-search label, +.form-inline label, +.form-search .btn-group, +.form-inline .btn-group { + display: inline-block; +} +// Remove margin for input-prepend/-append +.form-search .input-append, +.form-inline .input-append, +.form-search .input-prepend, +.form-inline .input-prepend { + margin-bottom: 0; +} +// Inline checkbox/radio labels (remove padding on left) +.form-search .radio, +.form-search .checkbox, +.form-inline .radio, +.form-inline .checkbox { + padding-left: 0; + margin-bottom: 0; + vertical-align: middle; +} +// Remove float and margin, set to inline-block +.form-search .radio input[type="radio"], +.form-search .checkbox input[type="checkbox"], +.form-inline .radio input[type="radio"], +.form-inline .checkbox input[type="checkbox"] { + float: left; + margin-right: 3px; + margin-left: 0; +} + + +// Margin to space out fieldsets +.control-group { + margin-bottom: @baseLineHeight / 2; +} + +// Legend collapses margin, so next element is responsible for spacing +legend + .control-group { + margin-top: @baseLineHeight; + -webkit-margin-top-collapse: separate; +} + +// Horizontal-specific styles +// -------------------------- + +.form-horizontal { + // Increase spacing between groups + .control-group { + margin-bottom: @baseLineHeight; + .clearfix(); + } + // Float the labels left + .control-label { + float: left; + width: @horizontalComponentOffset - 20; + padding-top: 5px; + text-align: right; + } + // Move over all input controls and content + .controls { + // Super jank IE7 fix to ensure the inputs in .input-append and input-prepend + // don't inherit the margin of the parent, in this case .controls + *display: inline-block; + *padding-left: 20px; + margin-left: @horizontalComponentOffset; + *margin-left: 0; + &:first-child { + *padding-left: @horizontalComponentOffset; + } + } + // Remove bottom margin on block level help text since that's accounted for on .control-group + .help-block { + margin-bottom: 0; + } + // And apply it only to .help-block instances that follow a form control + input, + select, + textarea, + .uneditable-input, + .input-prepend, + .input-append { + + .help-block { + margin-top: @baseLineHeight / 2; + } + } + // Move over buttons in .form-actions to align with .controls + .form-actions { + padding-left: @horizontalComponentOffset; + } +} diff --git a/app/assets/stylesheets/admin/framework/formt.less b/app/assets/stylesheets/admin/framework/formt.less new file mode 100644 index 0000000..30ea1a4 --- /dev/null +++ b/app/assets/stylesheets/admin/framework/formt.less @@ -0,0 +1,310 @@ +.formtastic{ + .label, .badge { + display: inline-block; + padding: 0px; + font-size: inherit; + font-weight: normal; + font-family:inherit; + line-height: 14px; + color:inherit; + vertical-align: baseline; + white-space: auto; + text-shadow: none; + background-color: transparent; + } + +} + + +/* ------------------------------------------------------------------------------------------------- + +It's *strongly* suggested that you don't modify this file. Instead, load a new stylesheet after +this one in your layouts (eg formtastic_changes.css) and override the styles to suit your needs. +This will allow you to update formtastic.css with new releases without clobbering your own changes. + +This stylesheet forms part of the Formtastic Rails Plugin +(c) 2008-2011 Justin French + +--------------------------------------------------------------------------------------------------*/ + +/* NORMALIZE AND RESET - obviously inspired by Yahoo's reset.css, but scoped to just .formtastic +--------------------------------------------------------------------------------------------------*/ +.formtastic, +.formtastic ul, +.formtastic ol, +.formtastic li, +.formtastic fieldset, +.formtastic legend, +.formtastic button, +.formtastic textarea, +.formtastic select, +.formtastic p { + margin:0; + padding:0; +} + +.formtastic fieldset { + border:0; +} + +.formtastic em, +.formtastic strong { + font-style:normal; + font-weight:normal; +} + +.formtastic ol, +.formtastic ul { + list-style:none; +} + +.formtastic abbr, +.formtastic acronym { + border:0; + font-variant:normal; +} + +.formtastic input, +.formtastic button, +.formtastic textarea { + font-family:sans-serif; + font-size:inherit; + font-weight:inherit; +} + +.formtastic input, +.formtastic textarea, +.formtastic select { + font-size:100%; +} + +.formtastic legend { + white-space:normal; + color:#000; +} + + +/* SEMANTIC ERRORS +--------------------------------------------------------------------------------------------------*/ +.formtastic .errors { + color:#cc0000; + margin:0.5em 0 1.5em 25%; + list-style:square; +} + +.formtastic .errors li { + padding:0; + border:none; + display:list-item; +} + + +/* BUTTONS & ACTIONS +--------------------------------------------------------------------------------------------------*/ +.formtastic .buttons, +.formtastic .actions { + overflow:hidden; /* clear containing floats */ + padding-left:25%; +} + +.formtastic .button, +.formtastic .action { + float:left; + padding-right:0.5em; +} + +.formtastic .button_action button { + padding:3px 8px; +} + +.formtastic .link_action a { + display:block; + padding:3px 0; +} + + +/* INPUTS +--------------------------------------------------------------------------------------------------*/ +.formtastic .inputs { + overflow:hidden; /* clear containing floats */ +} + +.formtastic .input { + overflow:hidden; /* clear containing floats */ + padding:0.5em 0; /* padding and negative margin juggling is for Firefox */ + margin-top:-0.5em; + margin-bottom:1em; +} + + +/* LEFT ALIGNED LABELS +--------------------------------------------------------------------------------------------------*/ +.formtastic .input .label { + display:block; + width:25%; + float:left; + padding-top:.2em; +} + +.formtastic .fragments .label, +.formtastic .choices .label { + position:absolute; + width:95%; + left:0px; +} + +.formtastic .fragments .label label, +.formtastic .choices .label label { + position:absolute; +} + +/* NESTED FIELDSETS AND LEGENDS (radio, check boxes and date/time inputs use nested fieldsets) +--------------------------------------------------------------------------------------------------*/ +.formtastic .choices { + position:relative; +} + +.formtastic .choices-group { + float:left; + width:74%; + margin:0; + padding:0 0 0 25%; +} + +.formtastic .choice { + padding:0; + border:0; +} + + +/* INLINE HINTS +--------------------------------------------------------------------------------------------------*/ +.formtastic .input .inline-hints { + color:#666; + margin:0.5em 0 0 25%; +} + + +/* INLINE ERRORS +--------------------------------------------------------------------------------------------------*/ +.formtastic .inline-errors { + color:#cc0000; + margin:0.5em 0 0 25%; +} + +.formtastic .errors { + color:#cc0000; + margin:0.5em 0 0 25%; + list-style:square; +} + +.formtastic .errors li { + padding:0; + border:none; + display:list-item; +} + + +/* STRING, NUMERIC, PASSWORD, EMAIL, URL, PHONE, SEARCH (ETC) OVERRIDES +--------------------------------------------------------------------------------------------------*/ +.formtastic .stringish input { + width:70%; +} + +.formtastic .stringish input[size], +.formtastic .stringish input[max] { + width:auto; + max-width:70%; +} + + +/* TEXTAREA OVERRIDES +--------------------------------------------------------------------------------------------------*/ +.formtastic .text textarea { + width:70%; +} + +.formtastic .text textarea[cols] { + width:auto; + max-width:70%; +} + + +/* HIDDEN OVERRIDES +--------------------------------------------------------------------------------------------------*/ +.formtastic .hidden { + display:none; +} + + +/* BOOLEAN LABELS +--------------------------------------------------------------------------------------------------*/ +.formtastic .boolean label { + padding-left:25%; + display:block; +} + + +/* CHOICE GROUPS +--------------------------------------------------------------------------------------------------*/ +.formtastic .choices-group { + margin-bottom:-0.5em; +} + +.formtastic .choice { + margin:0.1em 0 0.5em 0; +} + +.formtastic .choice label { + float:none; + width:100%; + line-height:100%; + padding-top:0; + margin-bottom:0.6em; +} + + +/* ADJUSTMENTS FOR INPUTS INSIDE LABELS (boolean input, radio input, check_boxes input) +--------------------------------------------------------------------------------------------------*/ +.formtastic .choice label input, +.formtastic .boolean label input { + margin:0 0.3em 0 0.1em; + line-height:100%; +} + + +/* FRAGMENTED INPUTS (DATE/TIME/DATETIME) +--------------------------------------------------------------------------------------------------*/ +.formtastic .fragments { + position:relative; +} + +.formtastic .fragments-group { + float:left; + width:74%; + margin:0; + padding:0 0 0 25%; +} + +.formtastic .fragment { + float:left; + width:auto; + margin:0 .3em 0 0; + padding:0; + border:0; +} + +.formtastic .fragment label { + display:none; +} + +.formtastic .fragment label input { + display:inline; + margin:0; + padding:0; +} + + +.formtastic .button{ + .btn; +} \ No newline at end of file diff --git a/app/assets/stylesheets/admin/framework/grid.less b/app/assets/stylesheets/admin/framework/grid.less new file mode 100755 index 0000000..750d203 --- /dev/null +++ b/app/assets/stylesheets/admin/framework/grid.less @@ -0,0 +1,21 @@ +// +// Grid system +// -------------------------------------------------- + + +// Fixed (940px) +#grid > .core(@gridColumnWidth, @gridGutterWidth); + +// Fluid (940px) +#grid > .fluid(@fluidGridColumnWidth, @fluidGridGutterWidth); + +// Reset utility classes due to specificity +[class*="span"].hide, +.row-fluid [class*="span"].hide { + display: none; +} + +[class*="span"].pull-right, +.row-fluid [class*="span"].pull-right { + float: right; +} diff --git a/app/assets/stylesheets/admin/framework/hero-unit.less b/app/assets/stylesheets/admin/framework/hero-unit.less new file mode 100755 index 0000000..763d86a --- /dev/null +++ b/app/assets/stylesheets/admin/framework/hero-unit.less @@ -0,0 +1,25 @@ +// +// Hero unit +// -------------------------------------------------- + + +.hero-unit { + padding: 60px; + margin-bottom: 30px; + font-size: 18px; + font-weight: 200; + line-height: @baseLineHeight * 1.5; + color: @heroUnitLeadColor; + background-color: @heroUnitBackground; + .border-radius(6px); + h1 { + margin-bottom: 0; + font-size: 60px; + line-height: 1; + color: @heroUnitHeadingColor; + letter-spacing: -1px; + } + li { + line-height: @baseLineHeight * 1.5; // Reset since we specify in type.less + } +} diff --git a/app/assets/stylesheets/admin/framework/labels-badges.less b/app/assets/stylesheets/admin/framework/labels-badges.less new file mode 100755 index 0000000..6035fcb --- /dev/null +++ b/app/assets/stylesheets/admin/framework/labels-badges.less @@ -0,0 +1,84 @@ +// +// Labels and badges +// -------------------------------------------------- + + +// Base classes +.label,.label2, +.badge { + display: inline-block; + padding: 2px 4px; + font-size: @baseFontSize * .846; + font-weight: bold; + line-height: 14px; // ensure proper line-height if floated + color: @white; + vertical-align: baseline; + white-space: nowrap; + text-shadow: 0 -1px 0 rgba(0,0,0,.25); + background-color: @grayLight; +} +// Set unique padding and border-radii +.label,.label2, { + .border-radius(3px); +} +.badge { + padding-left: 9px; + padding-right: 9px; + .border-radius(9px); +} + +// Empty labels/badges collapse +.label,.label2, +.badge { + &:empty { + display: none; + } +} + +// Hover/focus state, but only for links +a { + &.label:hover, + &.label:focus, + &.badge:hover, + &.badge:focus { + color: @white; + text-decoration: none; + cursor: pointer; + } +} + +// Colors +// Only give background-color difference to links (and to simplify, we don't qualifty with `a` but [href] attribute) +.label,.label2, +.badge { + // Important (red) + &-important { background-color: @errorText; } + &-important[href] { background-color: darken(@errorText, 10%); } + // Warnings (orange) + &-warning { background-color: @orange; } + &-warning[href] { background-color: darken(@orange, 10%); } + // Success (green) + &-success { background-color: @successText; } + &-success[href] { background-color: darken(@successText, 10%); } + // Info (turquoise) + &-info { background-color: @infoText; } + &-info[href] { background-color: darken(@infoText, 10%); } + // Inverse (black) + &-inverse { background-color: @grayDark; } + &-inverse[href] { background-color: darken(@grayDark, 10%); } +} + +// Quick fix for labels/badges in buttons +.btn { + .label.label2,, + .badge { + position: relative; + top: -1px; + } +} +.btn-mini { + .label.label2,, + .badge { + top: 0; + } +} diff --git a/app/assets/stylesheets/admin/framework/layouts.less b/app/assets/stylesheets/admin/framework/layouts.less new file mode 100755 index 0000000..24a2062 --- /dev/null +++ b/app/assets/stylesheets/admin/framework/layouts.less @@ -0,0 +1,16 @@ +// +// Layouts +// -------------------------------------------------- + + +// Container (centered, fixed-width layouts) +.container { + .container-fixed(); +} + +// Fluid layouts (left aligned, with sidebar, min- & max-width content) +.container-fluid { + padding-right: @gridGutterWidth; + padding-left: @gridGutterWidth; + .clearfix(); +} \ No newline at end of file diff --git a/app/assets/stylesheets/admin/framework/media.less b/app/assets/stylesheets/admin/framework/media.less new file mode 100755 index 0000000..e461e44 --- /dev/null +++ b/app/assets/stylesheets/admin/framework/media.less @@ -0,0 +1,55 @@ +// Media objects +// Source: http://stubbornella.org/content/?p=497 +// -------------------------------------------------- + + +// Common styles +// ------------------------- + +// Clear the floats +.media, +.media-body { + overflow: hidden; + *overflow: visible; + zoom: 1; +} + +// Proper spacing between instances of .media +.media, +.media .media { + margin-top: 15px; +} +.media:first-child { + margin-top: 0; +} + +// For images and videos, set to block +.media-object { + display: block; +} + +// Reset margins on headings for tighter default spacing +.media-heading { + margin: 0 0 5px; +} + + +// Media image alignment +// ------------------------- + +.media > .pull-left { + margin-right: 10px; +} +.media > .pull-right { + margin-left: 10px; +} + + +// Media list variation +// ------------------------- + +// Undo default ul/ol styles +.media-list { + margin-left: 0; + list-style: none; +} diff --git a/app/assets/stylesheets/admin/framework/mixins.less b/app/assets/stylesheets/admin/framework/mixins.less new file mode 100755 index 0000000..79d8892 --- /dev/null +++ b/app/assets/stylesheets/admin/framework/mixins.less @@ -0,0 +1,702 @@ +// +// Mixins +// -------------------------------------------------- + + +// UTILITY MIXINS +// -------------------------------------------------- + +// Clearfix +// -------- +// For clearing floats like a boss h5bp.com/q +.clearfix { + *zoom: 1; + &:before, + &:after { + display: table; + content: ""; + // Fixes Opera/contenteditable bug: + // http://nicolasgallagher.com/micro-clearfix-hack/#comment-36952 + line-height: 0; + } + &:after { + clear: both; + } +} + +// Webkit-style focus +// ------------------ +.tab-focus() { + // Default + outline: thin dotted #333; + // Webkit + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} + +// Center-align a block level element +// ---------------------------------- +.center-block() { + display: block; + margin-left: auto; + margin-right: auto; +} + +// IE7 inline-block +// ---------------- +.ie7-inline-block() { + *display: inline; /* IE7 inline-block hack */ + *zoom: 1; +} + +// IE7 likes to collapse whitespace on either side of the inline-block elements. +// Ems because we're attempting to match the width of a space character. Left +// version is for form buttons, which typically come after other elements, and +// right version is for icons, which come before. Applying both is ok, but it will +// mean that space between those elements will be .6em (~2 space characters) in IE7, +// instead of the 1 space in other browsers. +.ie7-restore-left-whitespace() { + *margin-left: .3em; + + &:first-child { + *margin-left: 0; + } +} + +.ie7-restore-right-whitespace() { + *margin-right: .3em; +} + +// Sizing shortcuts +// ------------------------- +.size(@height, @width) { + width: @width; + height: @height; +} +.square(@size) { + .size(@size, @size); +} + +// Placeholder text +// ------------------------- +.placeholder(@color: @placeholderText) { + &:-moz-placeholder { + color: @color; + } + &:-ms-input-placeholder { + color: @color; + } + &::-webkit-input-placeholder { + color: @color; + } +} + +// Text overflow +// ------------------------- +// Requires inline-block or block for proper styling +.text-overflow() { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +// CSS image replacement +// ------------------------- +// Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757 +.hide-text { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; +} + + +// FONTS +// -------------------------------------------------- + +#font { + #family { + .serif() { + font-family: @serifFontFamily; + } + .sans-serif() { + font-family: @sansFontFamily; + } + .monospace() { + font-family: @monoFontFamily; + } + } + .shorthand(@size: @baseFontSize, @weight: normal, @lineHeight: @baseLineHeight) { + font-size: @size; + font-weight: @weight; + line-height: @lineHeight; + } + .serif(@size: @baseFontSize, @weight: normal, @lineHeight: @baseLineHeight) { + #font > #family > .serif; + #font > .shorthand(@size, @weight, @lineHeight); + } + .sans-serif(@size: @baseFontSize, @weight: normal, @lineHeight: @baseLineHeight) { + #font > #family > .sans-serif; + #font > .shorthand(@size, @weight, @lineHeight); + } + .monospace(@size: @baseFontSize, @weight: normal, @lineHeight: @baseLineHeight) { + #font > #family > .monospace; + #font > .shorthand(@size, @weight, @lineHeight); + } +} + + +// FORMS +// -------------------------------------------------- + +// Block level inputs +.input-block-level { + display: block; + width: 100%; + min-height: @inputHeight; // Make inputs at least the height of their button counterpart (base line-height + padding + border) + .box-sizing(border-box); // Makes inputs behave like true block-level elements +} + + + +// Mixin for form field states +.formFieldState(@textColor: #555, @borderColor: #ccc, @backgroundColor: #f5f5f5) { + // Set the text color + .control-label, + .help-block, + .help-inline { + color: @textColor; + } + // Style inputs accordingly + .checkbox, + .radio, + input, + select, + textarea { + color: @textColor; + } + input, + select, + textarea { + border-color: @borderColor; + .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work + &:focus { + border-color: darken(@borderColor, 10%); + @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten(@borderColor, 20%); + .box-shadow(@shadow); + } + } + // Give a small background color for input-prepend/-append + .input-prepend .add-on, + .input-append .add-on { + color: @textColor; + background-color: @backgroundColor; + border-color: @textColor; + } +} + + + +// CSS3 PROPERTIES +// -------------------------------------------------- + +// Border Radius +.border-radius(@radius) { + -webkit-border-radius: @radius; + -moz-border-radius: @radius; + border-radius: @radius; +} + +// Single Corner Border Radius +.border-top-left-radius(@radius) { + -webkit-border-top-left-radius: @radius; + -moz-border-radius-topleft: @radius; + border-top-left-radius: @radius; +} +.border-top-right-radius(@radius) { + -webkit-border-top-right-radius: @radius; + -moz-border-radius-topright: @radius; + border-top-right-radius: @radius; +} +.border-bottom-right-radius(@radius) { + -webkit-border-bottom-right-radius: @radius; + -moz-border-radius-bottomright: @radius; + border-bottom-right-radius: @radius; +} +.border-bottom-left-radius(@radius) { + -webkit-border-bottom-left-radius: @radius; + -moz-border-radius-bottomleft: @radius; + border-bottom-left-radius: @radius; +} + +// Single Side Border Radius +.border-top-radius(@radius) { + .border-top-right-radius(@radius); + .border-top-left-radius(@radius); +} +.border-right-radius(@radius) { + .border-top-right-radius(@radius); + .border-bottom-right-radius(@radius); +} +.border-bottom-radius(@radius) { + .border-bottom-right-radius(@radius); + .border-bottom-left-radius(@radius); +} +.border-left-radius(@radius) { + .border-top-left-radius(@radius); + .border-bottom-left-radius(@radius); +} + +// Drop shadows +.box-shadow(@shadow) { + -webkit-box-shadow: @shadow; + -moz-box-shadow: @shadow; + box-shadow: @shadow; +} + +// Transitions +.transition(@transition) { + -webkit-transition: @transition; + -moz-transition: @transition; + -o-transition: @transition; + transition: @transition; +} +.transition-delay(@transition-delay) { + -webkit-transition-delay: @transition-delay; + -moz-transition-delay: @transition-delay; + -o-transition-delay: @transition-delay; + transition-delay: @transition-delay; +} +.transition-duration(@transition-duration) { + -webkit-transition-duration: @transition-duration; + -moz-transition-duration: @transition-duration; + -o-transition-duration: @transition-duration; + transition-duration: @transition-duration; +} + +// Transformations +.rotate(@degrees) { + -webkit-transform: rotate(@degrees); + -moz-transform: rotate(@degrees); + -ms-transform: rotate(@degrees); + -o-transform: rotate(@degrees); + transform: rotate(@degrees); +} +.scale(@ratio) { + -webkit-transform: scale(@ratio); + -moz-transform: scale(@ratio); + -ms-transform: scale(@ratio); + -o-transform: scale(@ratio); + transform: scale(@ratio); +} +.translate(@x, @y) { + -webkit-transform: translate(@x, @y); + -moz-transform: translate(@x, @y); + -ms-transform: translate(@x, @y); + -o-transform: translate(@x, @y); + transform: translate(@x, @y); +} +.skew(@x, @y) { + -webkit-transform: skew(@x, @y); + -moz-transform: skew(@x, @y); + -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twitter/bootstrap/issues/4885 + -o-transform: skew(@x, @y); + transform: skew(@x, @y); + -webkit-backface-visibility: hidden; // See https://github.com/twitter/bootstrap/issues/5319 +} +.translate3d(@x, @y, @z) { + -webkit-transform: translate3d(@x, @y, @z); + -moz-transform: translate3d(@x, @y, @z); + -o-transform: translate3d(@x, @y, @z); + transform: translate3d(@x, @y, @z); +} + +// Backface visibility +// Prevent browsers from flickering when using CSS 3D transforms. +// Default value is `visible`, but can be changed to `hidden +// See git pull https://github.com/dannykeane/bootstrap.git backface-visibility for examples +.backface-visibility(@visibility){ + -webkit-backface-visibility: @visibility; + -moz-backface-visibility: @visibility; + backface-visibility: @visibility; +} + +// Background clipping +// Heads up: FF 3.6 and under need "padding" instead of "padding-box" +.background-clip(@clip) { + -webkit-background-clip: @clip; + -moz-background-clip: @clip; + background-clip: @clip; +} + +// Background sizing +.background-size(@size) { + -webkit-background-size: @size; + -moz-background-size: @size; + -o-background-size: @size; + background-size: @size; +} + + +// Box sizing +.box-sizing(@boxmodel) { + -webkit-box-sizing: @boxmodel; + -moz-box-sizing: @boxmodel; + box-sizing: @boxmodel; +} + +// User select +// For selecting text on the page +.user-select(@select) { + -webkit-user-select: @select; + -moz-user-select: @select; + -ms-user-select: @select; + -o-user-select: @select; + user-select: @select; +} + +// Resize anything +.resizable(@direction) { + resize: @direction; // Options: horizontal, vertical, both + overflow: auto; // Safari fix +} + +// CSS3 Content Columns +.content-columns(@columnCount, @columnGap: @gridGutterWidth) { + -webkit-column-count: @columnCount; + -moz-column-count: @columnCount; + column-count: @columnCount; + -webkit-column-gap: @columnGap; + -moz-column-gap: @columnGap; + column-gap: @columnGap; +} + +// Optional hyphenation +.hyphens(@mode: auto) { + word-wrap: break-word; + -webkit-hyphens: @mode; + -moz-hyphens: @mode; + -ms-hyphens: @mode; + -o-hyphens: @mode; + hyphens: @mode; +} + +// Opacity +.opacity(@opacity) { + opacity: @opacity / 100; + filter: ~"alpha(opacity=@{opacity})"; +} + + + +// BACKGROUNDS +// -------------------------------------------------- + +// Add an alphatransparency value to any background or border color (via Elyse Holladay) +#translucent { + .background(@color: @white, @alpha: 1) { + background-color: hsla(hue(@color), saturation(@color), lightness(@color), @alpha); + } + .border(@color: @white, @alpha: 1) { + border-color: hsla(hue(@color), saturation(@color), lightness(@color), @alpha); + .background-clip(padding-box); + } +} + +// Gradient Bar Colors for buttons and alerts +.gradientBar(@primaryColor, @secondaryColor, @textColor: #fff, @textShadow: 0 -1px 0 rgba(0,0,0,.25)) { + color: @textColor; + text-shadow: @textShadow; + #gradient > .vertical(@primaryColor, @secondaryColor); + border-color: @secondaryColor @secondaryColor darken(@secondaryColor, 15%); + border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) fadein(rgba(0,0,0,.1), 15%); +} + +// Gradients +#gradient { + .horizontal(@startColor: #555, @endColor: #333) { + background-color: @endColor; + background-image: -moz-linear-gradient(left, @startColor, @endColor); // FF 3.6+ + background-image: -webkit-gradient(linear, 0 0, 100% 0, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+ + background-image: -webkit-linear-gradient(left, @startColor, @endColor); // Safari 5.1+, Chrome 10+ + background-image: -o-linear-gradient(left, @startColor, @endColor); // Opera 11.10 + background-image: linear-gradient(to right, @startColor, @endColor); // Standard, IE10 + background-repeat: repeat-x; + filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",argb(@startColor),argb(@endColor))); // IE9 and down + } + .vertical(@startColor: #555, @endColor: #333) { + background-color: mix(@startColor, @endColor, 60%); + background-image: -moz-linear-gradient(top, @startColor, @endColor); // FF 3.6+ + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+ + background-image: -webkit-linear-gradient(top, @startColor, @endColor); // Safari 5.1+, Chrome 10+ + background-image: -o-linear-gradient(top, @startColor, @endColor); // Opera 11.10 + background-image: linear-gradient(to bottom, @startColor, @endColor); // Standard, IE10 + background-repeat: repeat-x; + filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@startColor),argb(@endColor))); // IE9 and down + } + .directional(@startColor: #555, @endColor: #333, @deg: 45deg) { + background-color: @endColor; + background-repeat: repeat-x; + background-image: -moz-linear-gradient(@deg, @startColor, @endColor); // FF 3.6+ + background-image: -webkit-linear-gradient(@deg, @startColor, @endColor); // Safari 5.1+, Chrome 10+ + background-image: -o-linear-gradient(@deg, @startColor, @endColor); // Opera 11.10 + background-image: linear-gradient(@deg, @startColor, @endColor); // Standard, IE10 + } + .horizontal-three-colors(@startColor: #00b3ee, @midColor: #7a43b6, @colorStop: 50%, @endColor: #c3325f) { + background-color: mix(@midColor, @endColor, 80%); + background-image: -webkit-gradient(left, linear, 0 0, 0 100%, from(@startColor), color-stop(@colorStop, @midColor), to(@endColor)); + background-image: -webkit-linear-gradient(left, @startColor, @midColor @colorStop, @endColor); + background-image: -moz-linear-gradient(left, @startColor, @midColor @colorStop, @endColor); + background-image: -o-linear-gradient(left, @startColor, @midColor @colorStop, @endColor); + background-image: linear-gradient(to right, @startColor, @midColor @colorStop, @endColor); + background-repeat: no-repeat; + filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@startColor),argb(@endColor))); // IE9 and down, gets no color-stop at all for proper fallback + } + + .vertical-three-colors(@startColor: #00b3ee, @midColor: #7a43b6, @colorStop: 50%, @endColor: #c3325f) { + background-color: mix(@midColor, @endColor, 80%); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), color-stop(@colorStop, @midColor), to(@endColor)); + background-image: -webkit-linear-gradient(@startColor, @midColor @colorStop, @endColor); + background-image: -moz-linear-gradient(top, @startColor, @midColor @colorStop, @endColor); + background-image: -o-linear-gradient(@startColor, @midColor @colorStop, @endColor); + background-image: linear-gradient(@startColor, @midColor @colorStop, @endColor); + background-repeat: no-repeat; + filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@startColor),argb(@endColor))); // IE9 and down, gets no color-stop at all for proper fallback + } + .radial(@innerColor: #555, @outerColor: #333) { + background-color: @outerColor; + background-image: -webkit-gradient(radial, center center, 0, center center, 460, from(@innerColor), to(@outerColor)); + background-image: -webkit-radial-gradient(circle, @innerColor, @outerColor); + background-image: -moz-radial-gradient(circle, @innerColor, @outerColor); + background-image: -o-radial-gradient(circle, @innerColor, @outerColor); + background-repeat: no-repeat; + } + .striped(@color: #555, @angle: 45deg) { + background-color: @color; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(.25, rgba(255,255,255,.15)), color-stop(.25, transparent), color-stop(.5, transparent), color-stop(.5, rgba(255,255,255,.15)), color-stop(.75, rgba(255,255,255,.15)), color-stop(.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent); + } +} +// Reset filters for IE +.reset-filter() { + filter: e(%("progid:DXImageTransform.Microsoft.gradient(enabled = false)")); +} + + + +// COMPONENT MIXINS +// -------------------------------------------------- + +// Horizontal dividers +// ------------------------- +// Dividers (basically an hr) within dropdowns and nav lists +.nav-divider(@top: #e5e5e5, @bottom: @white) { + // IE7 needs a set width since we gave a height. Restricting just + // to IE7 to keep the 1px left/right space in other browsers. + // It is unclear where IE is getting the extra space that we need + // to negative-margin away, but so it goes. + *width: 100%; + height: 1px; + margin: ((@baseLineHeight / 2) - 1) 1px; // 8px 1px + *margin: -5px 0 5px; + overflow: hidden; + background-color: @top; + border-bottom: 1px solid @bottom; +} + +// Button backgrounds +// ------------------ +.buttonBackground(@startColor, @endColor, @textColor: #fff, @textShadow: 0 -1px 0 rgba(0,0,0,.25)) { + // gradientBar will set the background to a pleasing blend of these, to support IE<=9 + .gradientBar(@startColor, @endColor, @textColor, @textShadow); + *background-color: @endColor; /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + .reset-filter(); + + // in these cases the gradient won't cover the background, so we override + &:hover, &:focus, &:active, &.active, &.disabled, &[disabled] { + color: @textColor; + background-color: @endColor; + *background-color: darken(@endColor, 5%); + } + + // IE 7 + 8 can't handle box-shadow to show active, so we darken a bit ourselves + &:active, + &.active { + background-color: darken(@endColor, 10%) e("\9"); + } +} + +// Navbar vertical align +// ------------------------- +// Vertically center elements in the navbar. +// Example: an element has a height of 30px, so write out `.navbarVerticalAlign(30px);` to calculate the appropriate top margin. +.navbarVerticalAlign(@elementHeight) { + margin-top: (@navbarHeight - @elementHeight) / 2; +} + + + +// Grid System +// ----------- + +// Centered container element +.container-fixed() { + margin-right: auto; + margin-left: auto; + .clearfix(); +} + +// Table columns +.tableColumns(@columnSpan: 1) { + float: none; // undo default grid column styles + width: ((@gridColumnWidth) * @columnSpan) + (@gridGutterWidth * (@columnSpan - 1)) - 16; // 16 is total padding on left and right of table cells + margin-left: 0; // undo default grid column styles +} + +// Make a Grid +// Use .makeRow and .makeColumn to assign semantic layouts grid system behavior +.makeRow() { + margin-left: @gridGutterWidth * -1; + .clearfix(); +} +.makeColumn(@columns: 1, @offset: 0) { + float: left; + margin-left: (@gridColumnWidth * @offset) + (@gridGutterWidth * (@offset - 1)) + (@gridGutterWidth * 2); + width: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)); +} + +// The Grid +#grid { + + .core (@gridColumnWidth, @gridGutterWidth) { + + .spanX (@index) when (@index > 0) { + .span@{index} { .span(@index); } + .spanX(@index - 1); + } + .spanX (0) {} + + .offsetX (@index) when (@index > 0) { + .offset@{index} { .offset(@index); } + .offsetX(@index - 1); + } + .offsetX (0) {} + + .offset (@columns) { + margin-left: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns + 1)); + } + + .span (@columns) { + width: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)); + } + + .row { + margin-left: @gridGutterWidth * -1; + .clearfix(); + } + + [class*="span"] { + float: left; + min-height: 1px; // prevent collapsing columns + margin-left: @gridGutterWidth; + } + + // Set the container width, and override it for fixed navbars in media queries + .container, + .navbar-static-top .container, + .navbar-fixed-top .container, + .navbar-fixed-bottom .container { .span(@gridColumns); } + + // generate .spanX and .offsetX + .spanX (@gridColumns); + .offsetX (@gridColumns); + + } + + .fluid (@fluidGridColumnWidth, @fluidGridGutterWidth) { + + .spanX (@index) when (@index > 0) { + .span@{index} { .span(@index); } + .spanX(@index - 1); + } + .spanX (0) {} + + .offsetX (@index) when (@index > 0) { + .offset@{index} { .offset(@index); } + .offset@{index}:first-child { .offsetFirstChild(@index); } + .offsetX(@index - 1); + } + .offsetX (0) {} + + .offset (@columns) { + margin-left: (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1)) + (@fluidGridGutterWidth*2); + *margin-left: (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1)) - (.5 / @gridRowWidth * 100 * 1%) + (@fluidGridGutterWidth*2) - (.5 / @gridRowWidth * 100 * 1%); + } + + .offsetFirstChild (@columns) { + margin-left: (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1)) + (@fluidGridGutterWidth); + *margin-left: (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1)) - (.5 / @gridRowWidth * 100 * 1%) + @fluidGridGutterWidth - (.5 / @gridRowWidth * 100 * 1%); + } + + .span (@columns) { + width: (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1)); + *width: (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1)) - (.5 / @gridRowWidth * 100 * 1%); + } + + .row-fluid { + width: 100%; + .clearfix(); + [class*="span"] { + .input-block-level(); + float: left; + margin-left: @fluidGridGutterWidth; + *margin-left: @fluidGridGutterWidth - (.5 / @gridRowWidth * 100 * 1%); + } + [class*="span"]:first-child { + margin-left: 0; + } + + // Space grid-sized controls properly if multiple per line + .controls-row [class*="span"] + [class*="span"] { + margin-left: @fluidGridGutterWidth; + } + + // generate .spanX and .offsetX + .spanX (@gridColumns); + .offsetX (@gridColumns); + } + + } + + .input(@gridColumnWidth, @gridGutterWidth) { + + .spanX (@index) when (@index > 0) { + input.span@{index}, textarea.span@{index}, .uneditable-input.span@{index} { .span(@index); } + .spanX(@index - 1); + } + .spanX (0) {} + + .span(@columns) { + width: ((@gridColumnWidth) * @columns) + (@gridGutterWidth * (@columns - 1)) - 14; + } + + input, + textarea, + .uneditable-input { + margin-left: 0; // override margin-left from core grid system + } + + // Space grid-sized controls properly if multiple per line + .controls-row [class*="span"] + [class*="span"] { + margin-left: @gridGutterWidth; + } + + // generate .spanX + .spanX (@gridColumns); + + } +} diff --git a/app/assets/stylesheets/admin/framework/modals.less b/app/assets/stylesheets/admin/framework/modals.less new file mode 100755 index 0000000..5688260 --- /dev/null +++ b/app/assets/stylesheets/admin/framework/modals.less @@ -0,0 +1,95 @@ +// +// Modals +// -------------------------------------------------- + +// Background +.modal-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: @zindexModalBackdrop; + background-color: @black; + // Fade for backdrop + &.fade { opacity: 0; } +} + +.modal-backdrop, +.modal-backdrop.fade.in { + .opacity(0.6); +} + +// Base modal +.modal { + position: fixed; + top: 10%; + left: 50%; + z-index: @zindexModal; + width: 560px; + margin-left: -280px; + background-color: @white; + border: 1px solid #999; + border: 1px solid rgba(0,0,0,.3); + *border: 1px solid #999; /* IE6-7 */ + .border-radius(6px); + .box-shadow(0 3px 7px rgba(0,0,0,0.3)); + .background-clip(padding-box); + // Remove focus outline from opened modal + outline: none; + + &.fade { + .transition(e('opacity .3s linear, top .3s ease-out')); + top: -25%; + } + &.fade.in { top: 10%; } +} +.modal-header { + padding: 9px 15px; + border-bottom: 1px solid #eee; + // Close icon + .close { margin-top: 2px; } + // Heading + h3 { + margin: 0; + line-height: 30px; + } +} + +// Body (where all modal content resides) +.modal-body { + position: relative; + overflow-y: auto; + max-height: 400px; + padding: 15px; +} +// Remove bottom margin if need be +.modal-form { + margin-bottom: 0; +} + +// Footer (for actions) +.modal-footer { + padding: 14px 15px 15px; + margin-bottom: 0; + text-align: right; // right align buttons + background-color: #f5f5f5; + border-top: 1px solid #ddd; + .border-radius(0 0 6px 6px); + .box-shadow(inset 0 1px 0 @white); + .clearfix(); // clear it in case folks use .pull-* classes on buttons + + // Properly space out buttons + .btn + .btn { + margin-left: 5px; + margin-bottom: 0; // account for input[type="submit"] which gets the bottom margin like all other inputs + } + // but override that for button groups + .btn-group .btn + .btn { + margin-left: -1px; + } + // and override it for block buttons as well + .btn-block + .btn-block { + margin-left: 0; + } +} diff --git a/app/assets/stylesheets/admin/framework/navbar.less b/app/assets/stylesheets/admin/framework/navbar.less new file mode 100755 index 0000000..93d09bc --- /dev/null +++ b/app/assets/stylesheets/admin/framework/navbar.less @@ -0,0 +1,497 @@ +// +// Navbars (Redux) +// -------------------------------------------------- + + +// COMMON STYLES +// ------------- + +// Base class and wrapper +.navbar { + overflow: visible; + margin-bottom: @baseLineHeight; + + // Fix for IE7's bad z-indexing so dropdowns don't appear below content that follows the navbar + *position: relative; + *z-index: 2; +} + +// Inner for background effects +// Gradient is applied to its own element because overflow visible is not honored by IE when filter is present +.navbar-inner { + min-height: @navbarHeight; + padding-left: 20px; + padding-right: 20px; + #gradient > .vertical(@navbarBackgroundHighlight, @navbarBackground); + border: 1px solid @navbarBorder; + .border-radius(@baseBorderRadius); + .box-shadow(0 1px 4px rgba(0,0,0,.065)); + + // Prevent floats from breaking the navbar + .clearfix(); +} + +// Set width to auto for default container +// We then reset it for fixed navbars in the #gridSystem mixin +.navbar .container { + width: auto; +} + +// Override the default collapsed state +.nav-collapse.collapse { + height: auto; + overflow: visible; +} + + +// Brand: website or project name +// ------------------------- +.navbar .brand { + float: left; + display: block; + // Vertically center the text given @navbarHeight + padding: ((@navbarHeight - @baseLineHeight) / 2) 20px ((@navbarHeight - @baseLineHeight) / 2); + margin-left: -20px; // negative indent to left-align the text down the page + font-size: 20px; + font-weight: 200; + color: @navbarBrandColor; + text-shadow: 0 1px 0 @navbarBackgroundHighlight; + &:hover, + &:focus { + text-decoration: none; + } +} + +// Plain text in topbar +// ------------------------- +.navbar-text { + margin-bottom: 0; + line-height: @navbarHeight; + color: @navbarText; +} + +// Janky solution for now to account for links outside the .nav +// ------------------------- +.navbar-link { + color: @navbarLinkColor; + &:hover, + &:focus { + color: @navbarLinkColorHover; + } +} + +// Dividers in navbar +// ------------------------- +.navbar .divider-vertical { + height: @navbarHeight; + margin: 0 9px; + border-left: 1px solid @navbarBackground; + border-right: 1px solid @navbarBackgroundHighlight; +} + +// Buttons in navbar +// ------------------------- +.navbar .btn, +.navbar .btn-group { + .navbarVerticalAlign(30px); // Vertically center in navbar +} +.navbar .btn-group .btn, +.navbar .input-prepend .btn, +.navbar .input-append .btn, +.navbar .input-prepend .btn-group, +.navbar .input-append .btn-group { + margin-top: 0; // then undo the margin here so we don't accidentally double it +} + +// Navbar forms +// ------------------------- +.navbar-form { + margin-bottom: 0; // remove default bottom margin + .clearfix(); + input, + select, + .radio, + .checkbox { + .navbarVerticalAlign(30px); // Vertically center in navbar + } + input, + select, + .btn { + display: inline-block; + margin-bottom: 0; + } + input[type="image"], + input[type="checkbox"], + input[type="radio"] { + margin-top: 3px; + } + .input-append, + .input-prepend { + margin-top: 5px; + white-space: nowrap; // preven two items from separating within a .navbar-form that has .pull-left + input { + margin-top: 0; // remove the margin on top since it's on the parent + } + } +} + +// Navbar search +// ------------------------- +.navbar-search { + position: relative; + float: left; + .navbarVerticalAlign(30px); // Vertically center in navbar + margin-bottom: 0; + .search-query { + margin-bottom: 0; + padding: 4px 14px; + #font > .sans-serif(13px, normal, 1); + .border-radius(15px); // redeclare because of specificity of the type attribute + } +} + + + +// Static navbar +// ------------------------- + +.navbar-static-top { + position: static; + margin-bottom: 0; // remove 18px margin for default navbar + .navbar-inner { + .border-radius(0); + } +} + + + +// Fixed navbar +// ------------------------- + +// Shared (top/bottom) styles +.navbar-fixed-top, +.navbar-fixed-bottom { + position: fixed; + right: 0; + left: 0; + z-index: @zindexFixedNavbar; + margin-bottom: 0; // remove 18px margin for default navbar +} +.navbar-fixed-top .navbar-inner, +.navbar-static-top .navbar-inner { + border-width: 0 0 1px; +} +.navbar-fixed-bottom .navbar-inner { + border-width: 1px 0 0; +} +.navbar-fixed-top .navbar-inner, +.navbar-fixed-bottom .navbar-inner { + padding-left: 0; + padding-right: 0; + .border-radius(0); +} + +// Reset container width +// Required here as we reset the width earlier on and the grid mixins don't override early enough +.navbar-static-top .container, +.navbar-fixed-top .container, +.navbar-fixed-bottom .container { + #grid > .core > .span(@gridColumns); +} + +// Fixed to top +.navbar-fixed-top { + top: 0; +} +.navbar-fixed-top, +.navbar-static-top { + .navbar-inner { + .box-shadow(~"0 1px 10px rgba(0,0,0,.1)"); + } +} + +// Fixed to bottom +.navbar-fixed-bottom { + bottom: 0; + .navbar-inner { + .box-shadow(~"0 -1px 10px rgba(0,0,0,.1)"); + } +} + + + +// NAVIGATION +// ---------- + +.navbar .nav { + position: relative; + left: 0; + display: block; + float: left; + margin: 0 10px 0 0; +} +.navbar .nav.pull-right { + float: right; // redeclare due to specificity + margin-right: 0; // remove margin on float right nav +} +.navbar .nav > li { + float: left; +} + +// Links +.navbar .nav > li > a { + float: none; + // Vertically center the text given @navbarHeight + padding: ((@navbarHeight - @baseLineHeight) / 2) 15px ((@navbarHeight - @baseLineHeight) / 2); + color: @navbarLinkColor; + text-decoration: none; + text-shadow: 0 1px 0 @navbarBackgroundHighlight; +} +.navbar .nav .dropdown-toggle .caret { + margin-top: 8px; +} + +// Hover/focus +.navbar .nav > li > a:focus, +.navbar .nav > li > a:hover { + background-color: @navbarLinkBackgroundHover; // "transparent" is default to differentiate :hover/:focus from .active + color: @navbarLinkColorHover; + text-decoration: none; +} + +// Active nav items +.navbar .nav > .active > a, +.navbar .nav > .active > a:hover, +.navbar .nav > .active > a:focus { + color: @navbarLinkColorActive; + text-decoration: none; + background-color: @navbarLinkBackgroundActive; + .box-shadow(inset 0 3px 8px rgba(0,0,0,.125)); +} + +// Navbar button for toggling navbar items in responsive layouts +// These definitions need to come after '.navbar .btn' +.navbar .btn-navbar { + display: none; + float: right; + padding: 7px 10px; + margin-left: 5px; + margin-right: 5px; + .buttonBackground(darken(@navbarBackgroundHighlight, 5%), darken(@navbarBackground, 5%)); + .box-shadow(~"inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075)"); +} +.navbar .btn-navbar .icon-bar { + display: block; + width: 18px; + height: 2px; + background-color: #f5f5f5; + .border-radius(1px); + .box-shadow(0 1px 0 rgba(0,0,0,.25)); +} +.btn-navbar .icon-bar + .icon-bar { + margin-top: 3px; +} + + + +// Dropdown menus +// -------------- + +// Menu position and menu carets +.navbar .nav > li > .dropdown-menu { + &:before { + content: ''; + display: inline-block; + border-left: 7px solid transparent; + border-right: 7px solid transparent; + border-bottom: 7px solid #ccc; + border-bottom-color: @dropdownBorder; + position: absolute; + top: -7px; + left: 9px; + } + &:after { + content: ''; + display: inline-block; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid @dropdownBackground; + position: absolute; + top: -6px; + left: 10px; + } +} +// Menu position and menu caret support for dropups via extra dropup class +.navbar-fixed-bottom .nav > li > .dropdown-menu { + &:before { + border-top: 7px solid #ccc; + border-top-color: @dropdownBorder; + border-bottom: 0; + bottom: -7px; + top: auto; + } + &:after { + border-top: 6px solid @dropdownBackground; + border-bottom: 0; + bottom: -6px; + top: auto; + } +} + +// Caret should match text color on hover/focus +.navbar .nav li.dropdown > a:hover .caret, +.navbar .nav li.dropdown > a:focus .caret { + border-top-color: @navbarLinkColorHover; + border-bottom-color: @navbarLinkColorHover; +} + +// Remove background color from open dropdown +.navbar .nav li.dropdown.open > .dropdown-toggle, +.navbar .nav li.dropdown.active > .dropdown-toggle, +.navbar .nav li.dropdown.open.active > .dropdown-toggle { + background-color: @navbarLinkBackgroundActive; + color: @navbarLinkColorActive; +} +.navbar .nav li.dropdown > .dropdown-toggle .caret { + border-top-color: @navbarLinkColor; + border-bottom-color: @navbarLinkColor; +} +.navbar .nav li.dropdown.open > .dropdown-toggle .caret, +.navbar .nav li.dropdown.active > .dropdown-toggle .caret, +.navbar .nav li.dropdown.open.active > .dropdown-toggle .caret { + border-top-color: @navbarLinkColorActive; + border-bottom-color: @navbarLinkColorActive; +} + +// Right aligned menus need alt position +.navbar .pull-right > li > .dropdown-menu, +.navbar .nav > li > .dropdown-menu.pull-right { + left: auto; + right: 0; + &:before { + left: auto; + right: 12px; + } + &:after { + left: auto; + right: 13px; + } + .dropdown-menu { + left: auto; + right: 100%; + margin-left: 0; + margin-right: -1px; + .border-radius(6px 0 6px 6px); + } +} + + +// Inverted navbar +// ------------------------- + +.navbar-inverse { + + .navbar-inner { + #gradient > .vertical(@navbarInverseBackgroundHighlight, @navbarInverseBackground); + border-color: @navbarInverseBorder; + } + + .brand, + .nav > li > a { + color: @navbarInverseLinkColor; + text-shadow: 0 -1px 0 rgba(0,0,0,.25); + &:hover, + &:focus { + color: @navbarInverseLinkColorHover; + } + } + + .brand { + color: @navbarInverseBrandColor; + } + + .navbar-text { + color: @navbarInverseText; + } + + .nav > li > a:focus, + .nav > li > a:hover { + background-color: @navbarInverseLinkBackgroundHover; + color: @navbarInverseLinkColorHover; + } + + .nav .active > a, + .nav .active > a:hover, + .nav .active > a:focus { + color: @navbarInverseLinkColorActive; + background-color: @navbarInverseLinkBackgroundActive; + } + + // Inline text links + .navbar-link { + color: @navbarInverseLinkColor; + &:hover, + &:focus { + color: @navbarInverseLinkColorHover; + } + } + + // Dividers in navbar + .divider-vertical { + border-left-color: @navbarInverseBackground; + border-right-color: @navbarInverseBackgroundHighlight; + } + + // Dropdowns + .nav li.dropdown.open > .dropdown-toggle, + .nav li.dropdown.active > .dropdown-toggle, + .nav li.dropdown.open.active > .dropdown-toggle { + background-color: @navbarInverseLinkBackgroundActive; + color: @navbarInverseLinkColorActive; + } + .nav li.dropdown > a:hover .caret, + .nav li.dropdown > a:focus .caret { + border-top-color: @navbarInverseLinkColorActive; + border-bottom-color: @navbarInverseLinkColorActive; + } + .nav li.dropdown > .dropdown-toggle .caret { + border-top-color: @navbarInverseLinkColor; + border-bottom-color: @navbarInverseLinkColor; + } + .nav li.dropdown.open > .dropdown-toggle .caret, + .nav li.dropdown.active > .dropdown-toggle .caret, + .nav li.dropdown.open.active > .dropdown-toggle .caret { + border-top-color: @navbarInverseLinkColorActive; + border-bottom-color: @navbarInverseLinkColorActive; + } + + // Navbar search + .navbar-search { + .search-query { + color: @white; + background-color: @navbarInverseSearchBackground; + border-color: @navbarInverseSearchBorder; + .box-shadow(~"inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15)"); + .transition(none); + .placeholder(@navbarInverseSearchPlaceholderColor); + + // Focus states (we use .focused since IE7-8 and down doesn't support :focus) + &:focus, + &.focused { + padding: 5px 15px; + color: @grayDark; + text-shadow: 0 1px 0 @white; + background-color: @navbarInverseSearchBackgroundFocus; + border: 0; + .box-shadow(0 0 3px rgba(0,0,0,.15)); + outline: 0; + } + } + } + + // Navbar collapse button + .btn-navbar { + .buttonBackground(darken(@navbarInverseBackgroundHighlight, 5%), darken(@navbarInverseBackground, 5%)); + } + +} diff --git a/app/assets/stylesheets/admin/framework/navs.less b/app/assets/stylesheets/admin/framework/navs.less new file mode 100755 index 0000000..01cd805 --- /dev/null +++ b/app/assets/stylesheets/admin/framework/navs.less @@ -0,0 +1,409 @@ +// +// Navs +// -------------------------------------------------- + + +// BASE CLASS +// ---------- + +.nav { + margin-left: 0; + margin-bottom: @baseLineHeight; + list-style: none; +} + +// Make links block level +.nav > li > a { + display: block; +} +.nav > li > a:hover, +.nav > li > a:focus { + text-decoration: none; + background-color: @grayLighter; +} + +// Prevent IE8 from misplacing imgs +// See https://github.com/h5bp/html5-boilerplate/issues/984#issuecomment-3985989 +.nav > li > a > img { + max-width: none; +} + +// Redeclare pull classes because of specifity +.nav > .pull-right { + float: right; +} + +// Nav headers (for dropdowns and lists) +.nav-header { + display: block; + padding: 3px 15px; + font-size: 11px; + font-weight: bold; + line-height: @baseLineHeight; + color: @grayLight; + text-shadow: 0 1px 0 rgba(255,255,255,.5); + text-transform: uppercase; +} +// Space them out when they follow another list item (link) +.nav li + .nav-header { + margin-top: 9px; +} + + + +// NAV LIST +// -------- + +.nav-list { + padding-left: 15px; + padding-right: 15px; + margin-bottom: 0; +} +.nav-list > li > a, +.nav-list .nav-header { + margin-left: -15px; + margin-right: -15px; + text-shadow: 0 1px 0 rgba(255,255,255,.5); +} +.nav-list > li > a { + padding: 3px 15px; +} +.nav-list > .active > a, +.nav-list > .active > a:hover, +.nav-list > .active > a:focus { + color: @white; + text-shadow: 0 -1px 0 rgba(0,0,0,.2); + background-color: @linkColor; +} +.nav-list [class^="icon-"], +.nav-list [class*=" icon-"] { + margin-right: 2px; +} +// Dividers (basically an hr) within the dropdown +.nav-list .divider { + .nav-divider(); +} + + + +// TABS AND PILLS +// ------------- + +// Common styles +.nav-tabs, +.nav-pills { + .clearfix(); +} +.nav-tabs > li, +.nav-pills > li { + float: left; +} +.nav-tabs > li > a, +.nav-pills > li > a { + padding-right: 12px; + padding-left: 12px; + margin-right: 2px; + line-height: 14px; // keeps the overall height an even number +} + +// TABS +// ---- + +// Give the tabs something to sit on +.nav-tabs { + border-bottom: 1px solid #ddd; +} +// Make the list-items overlay the bottom border +.nav-tabs > li { + margin-bottom: -1px; +} +// Actual tabs (as links) +.nav-tabs > li > a { + padding-top: 8px; + padding-bottom: 8px; + line-height: @baseLineHeight; + border: 1px solid transparent; + .border-radius(4px 4px 0 0); + &:hover, + &:focus { + border-color: @grayLighter @grayLighter #ddd; + } +} +// Active state, and it's :hover/:focus to override normal :hover/:focus +.nav-tabs > .active > a, +.nav-tabs > .active > a:hover, +.nav-tabs > .active > a:focus { + color: @gray; + background-color: @bodyBackground; + border: 1px solid #ddd; + border-bottom-color: transparent; + cursor: default; +} + + +// PILLS +// ----- + +// Links rendered as pills +.nav-pills > li > a { + padding-top: 8px; + padding-bottom: 8px; + margin-top: 2px; + margin-bottom: 2px; + .border-radius(5px); +} + +// Active state +.nav-pills > .active > a, +.nav-pills > .active > a:hover, +.nav-pills > .active > a:focus { + color: @white; + background-color: @linkColor; +} + + + +// STACKED NAV +// ----------- + +// Stacked tabs and pills +.nav-stacked > li { + float: none; +} +.nav-stacked > li > a { + margin-right: 0; // no need for the gap between nav items +} + +// Tabs +.nav-tabs.nav-stacked { + border-bottom: 0; +} +.nav-tabs.nav-stacked > li > a { + border: 1px solid #ddd; + .border-radius(0); +} +.nav-tabs.nav-stacked > li:first-child > a { + .border-top-radius(4px); +} +.nav-tabs.nav-stacked > li:last-child > a { + .border-bottom-radius(4px); +} +.nav-tabs.nav-stacked > li > a:hover, +.nav-tabs.nav-stacked > li > a:focus { + border-color: #ddd; + z-index: 2; +} + +// Pills +.nav-pills.nav-stacked > li > a { + margin-bottom: 3px; +} +.nav-pills.nav-stacked > li:last-child > a { + margin-bottom: 1px; // decrease margin to match sizing of stacked tabs +} + + + +// DROPDOWNS +// --------- + +.nav-tabs .dropdown-menu { + .border-radius(0 0 6px 6px); // remove the top rounded corners here since there is a hard edge above the menu +} +.nav-pills .dropdown-menu { + .border-radius(6px); // make rounded corners match the pills +} + +// Default dropdown links +// ------------------------- +// Make carets use linkColor to start +.nav .dropdown-toggle .caret { + border-top-color: @linkColor; + border-bottom-color: @linkColor; + margin-top: 6px; +} +.nav .dropdown-toggle:hover .caret, +.nav .dropdown-toggle:focus .caret { + border-top-color: @linkColorHover; + border-bottom-color: @linkColorHover; +} +/* move down carets for tabs */ +.nav-tabs .dropdown-toggle .caret { + margin-top: 8px; +} + +// Active dropdown links +// ------------------------- +.nav .active .dropdown-toggle .caret { + border-top-color: #fff; + border-bottom-color: #fff; +} +.nav-tabs .active .dropdown-toggle .caret { + border-top-color: @gray; + border-bottom-color: @gray; +} + +// Active:hover/:focus dropdown links +// ------------------------- +.nav > .dropdown.active > a:hover, +.nav > .dropdown.active > a:focus { + cursor: pointer; +} + +// Open dropdowns +// ------------------------- +.nav-tabs .open .dropdown-toggle, +.nav-pills .open .dropdown-toggle, +.nav > li.dropdown.open.active > a:hover, +.nav > li.dropdown.open.active > a:focus { + color: @white; + background-color: @grayLight; + border-color: @grayLight; +} +.nav li.dropdown.open .caret, +.nav li.dropdown.open.active .caret, +.nav li.dropdown.open a:hover .caret, +.nav li.dropdown.open a:focus .caret { + border-top-color: @white; + border-bottom-color: @white; + .opacity(100); +} + +// Dropdowns in stacked tabs +.tabs-stacked .open > a:hover, +.tabs-stacked .open > a:focus { + border-color: @grayLight; +} + + + +// TABBABLE +// -------- + + +// COMMON STYLES +// ------------- + +// Clear any floats +.tabbable { + .clearfix(); +} +.tab-content { + overflow: auto; // prevent content from running below tabs +} + +// Remove border on bottom, left, right +.tabs-below > .nav-tabs, +.tabs-right > .nav-tabs, +.tabs-left > .nav-tabs { + border-bottom: 0; +} + +// Show/hide tabbable areas +.tab-content > .tab-pane, +.pill-content > .pill-pane { + display: none; +} +.tab-content > .active, +.pill-content > .active { + display: block; +} + + +// BOTTOM +// ------ + +.tabs-below > .nav-tabs { + border-top: 1px solid #ddd; +} +.tabs-below > .nav-tabs > li { + margin-top: -1px; + margin-bottom: 0; +} +.tabs-below > .nav-tabs > li > a { + .border-radius(0 0 4px 4px); + &:hover, + &:focus { + border-bottom-color: transparent; + border-top-color: #ddd; + } +} +.tabs-below > .nav-tabs > .active > a, +.tabs-below > .nav-tabs > .active > a:hover, +.tabs-below > .nav-tabs > .active > a:focus { + border-color: transparent #ddd #ddd #ddd; +} + +// LEFT & RIGHT +// ------------ + +// Common styles +.tabs-left > .nav-tabs > li, +.tabs-right > .nav-tabs > li { + float: none; +} +.tabs-left > .nav-tabs > li > a, +.tabs-right > .nav-tabs > li > a { + min-width: 74px; + margin-right: 0; + margin-bottom: 3px; +} + +// Tabs on the left +.tabs-left > .nav-tabs { + float: left; + margin-right: 19px; + border-right: 1px solid #ddd; +} +.tabs-left > .nav-tabs > li > a { + margin-right: -1px; + .border-radius(4px 0 0 4px); +} +.tabs-left > .nav-tabs > li > a:hover, +.tabs-left > .nav-tabs > li > a:focus { + border-color: @grayLighter #ddd @grayLighter @grayLighter; +} +.tabs-left > .nav-tabs .active > a, +.tabs-left > .nav-tabs .active > a:hover, +.tabs-left > .nav-tabs .active > a:focus { + border-color: #ddd transparent #ddd #ddd; + *border-right-color: @white; +} + +// Tabs on the right +.tabs-right > .nav-tabs { + float: right; + margin-left: 19px; + border-left: 1px solid #ddd; +} +.tabs-right > .nav-tabs > li > a { + margin-left: -1px; + .border-radius(0 4px 4px 0); +} +.tabs-right > .nav-tabs > li > a:hover, +.tabs-right > .nav-tabs > li > a:focus { + border-color: @grayLighter @grayLighter @grayLighter #ddd; +} +.tabs-right > .nav-tabs .active > a, +.tabs-right > .nav-tabs .active > a:hover, +.tabs-right > .nav-tabs .active > a:focus { + border-color: #ddd #ddd #ddd transparent; + *border-left-color: @white; +} + + + +// DISABLED STATES +// --------------- + +// Gray out text +.nav > .disabled > a { + color: @grayLight; +} +// Nuke hover/focus effects +.nav > .disabled > a:hover, +.nav > .disabled > a:focus { + text-decoration: none; + background-color: transparent; + cursor: default; +} diff --git a/app/assets/stylesheets/admin/framework/pager.less b/app/assets/stylesheets/admin/framework/pager.less new file mode 100755 index 0000000..1476188 --- /dev/null +++ b/app/assets/stylesheets/admin/framework/pager.less @@ -0,0 +1,43 @@ +// +// Pager pagination +// -------------------------------------------------- + + +.pager { + margin: @baseLineHeight 0; + list-style: none; + text-align: center; + .clearfix(); +} +.pager li { + display: inline; +} +.pager li > a, +.pager li > span { + display: inline-block; + padding: 5px 14px; + background-color: #fff; + border: 1px solid #ddd; + .border-radius(15px); +} +.pager li > a:hover, +.pager li > a:focus { + text-decoration: none; + background-color: #f5f5f5; +} +.pager .next > a, +.pager .next > span { + float: right; +} +.pager .previous > a, +.pager .previous > span { + float: left; +} +.pager .disabled > a, +.pager .disabled > a:hover, +.pager .disabled > a:focus, +.pager .disabled > span { + color: @grayLight; + background-color: #fff; + cursor: default; +} \ No newline at end of file diff --git a/app/assets/stylesheets/admin/framework/pagination.less b/app/assets/stylesheets/admin/framework/pagination.less new file mode 100755 index 0000000..a789db2 --- /dev/null +++ b/app/assets/stylesheets/admin/framework/pagination.less @@ -0,0 +1,123 @@ +// +// Pagination (multiple pages) +// -------------------------------------------------- + +// Space out pagination from surrounding content +.pagination { + margin: @baseLineHeight 0; +} + +.pagination ul { + // Allow for text-based alignment + display: inline-block; + .ie7-inline-block(); + // Reset default ul styles + margin-left: 0; + margin-bottom: 0; + // Visuals + .border-radius(@baseBorderRadius); + .box-shadow(0 1px 2px rgba(0,0,0,.05)); +} +.pagination ul > li { + display: inline; // Remove list-style and block-level defaults +} +.pagination ul > li > a, +.pagination ul > li > span { + float: left; // Collapse white-space + padding: 4px 12px; + line-height: @baseLineHeight; + text-decoration: none; + background-color: @paginationBackground; + border: 1px solid @paginationBorder; + border-left-width: 0; +} +.pagination ul > li > a:hover, +.pagination ul > li > a:focus, +.pagination ul > .active > a, +.pagination ul > .active > span { + background-color: @paginationActiveBackground; +} +.pagination ul > .active > a, +.pagination ul > .active > span { + color: @grayLight; + cursor: default; +} +.pagination ul > .disabled > span, +.pagination ul > .disabled > a, +.pagination ul > .disabled > a:hover, +.pagination ul > .disabled > a:focus { + color: @grayLight; + background-color: transparent; + cursor: default; +} +.pagination ul > li:first-child > a, +.pagination ul > li:first-child > span { + border-left-width: 1px; + .border-left-radius(@baseBorderRadius); +} +.pagination ul > li:last-child > a, +.pagination ul > li:last-child > span { + .border-right-radius(@baseBorderRadius); +} + + +// Alignment +// -------------------------------------------------- + +.pagination-centered { + text-align: center; +} +.pagination-right { + text-align: right; +} + + +// Sizing +// -------------------------------------------------- + +// Large +.pagination-large { + ul > li > a, + ul > li > span { + padding: @paddingLarge; + font-size: @fontSizeLarge; + } + ul > li:first-child > a, + ul > li:first-child > span { + .border-left-radius(@borderRadiusLarge); + } + ul > li:last-child > a, + ul > li:last-child > span { + .border-right-radius(@borderRadiusLarge); + } +} + +// Small and mini +.pagination-mini, +.pagination-small { + ul > li:first-child > a, + ul > li:first-child > span { + .border-left-radius(@borderRadiusSmall); + } + ul > li:last-child > a, + ul > li:last-child > span { + .border-right-radius(@borderRadiusSmall); + } +} + +// Small +.pagination-small { + ul > li > a, + ul > li > span { + padding: @paddingSmall; + font-size: @fontSizeSmall; + } +} +// Mini +.pagination-mini { + ul > li > a, + ul > li > span { + padding: @paddingMini; + font-size: @fontSizeMini; + } +} diff --git a/app/assets/stylesheets/admin/framework/popovers.less b/app/assets/stylesheets/admin/framework/popovers.less new file mode 100755 index 0000000..aae35c8 --- /dev/null +++ b/app/assets/stylesheets/admin/framework/popovers.less @@ -0,0 +1,133 @@ +// +// Popovers +// -------------------------------------------------- + + +.popover { + position: absolute; + top: 0; + left: 0; + z-index: @zindexPopover; + display: none; + max-width: 276px; + padding: 1px; + text-align: left; // Reset given new insertion method + background-color: @popoverBackground; + -webkit-background-clip: padding-box; + -moz-background-clip: padding; + background-clip: padding-box; + border: 1px solid #ccc; + border: 1px solid rgba(0,0,0,.2); + .border-radius(6px); + .box-shadow(0 5px 10px rgba(0,0,0,.2)); + + // Overrides for proper insertion + white-space: normal; + + // Offset the popover to account for the popover arrow + &.top { margin-top: -10px; } + &.right { margin-left: 10px; } + &.bottom { margin-top: 10px; } + &.left { margin-left: -10px; } +} + +.popover-title { + margin: 0; // reset heading margin + padding: 8px 14px; + font-size: 14px; + font-weight: normal; + line-height: 18px; + background-color: @popoverTitleBackground; + border-bottom: 1px solid darken(@popoverTitleBackground, 5%); + .border-radius(5px 5px 0 0); + + &:empty { + display: none; + } +} + +.popover-content { + padding: 9px 14px; +} + +// Arrows +// +// .arrow is outer, .arrow:after is inner + +.popover .arrow, +.popover .arrow:after { + position: absolute; + display: block; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} +.popover .arrow { + border-width: @popoverArrowOuterWidth; +} +.popover .arrow:after { + border-width: @popoverArrowWidth; + content: ""; +} + +.popover { + &.top .arrow { + left: 50%; + margin-left: -@popoverArrowOuterWidth; + border-bottom-width: 0; + border-top-color: #999; // IE8 fallback + border-top-color: @popoverArrowOuterColor; + bottom: -@popoverArrowOuterWidth; + &:after { + bottom: 1px; + margin-left: -@popoverArrowWidth; + border-bottom-width: 0; + border-top-color: @popoverArrowColor; + } + } + &.right .arrow { + top: 50%; + left: -@popoverArrowOuterWidth; + margin-top: -@popoverArrowOuterWidth; + border-left-width: 0; + border-right-color: #999; // IE8 fallback + border-right-color: @popoverArrowOuterColor; + &:after { + left: 1px; + bottom: -@popoverArrowWidth; + border-left-width: 0; + border-right-color: @popoverArrowColor; + } + } + &.bottom .arrow { + left: 50%; + margin-left: -@popoverArrowOuterWidth; + border-top-width: 0; + border-bottom-color: #999; // IE8 fallback + border-bottom-color: @popoverArrowOuterColor; + top: -@popoverArrowOuterWidth; + &:after { + top: 1px; + margin-left: -@popoverArrowWidth; + border-top-width: 0; + border-bottom-color: @popoverArrowColor; + } + } + + &.left .arrow { + top: 50%; + right: -@popoverArrowOuterWidth; + margin-top: -@popoverArrowOuterWidth; + border-right-width: 0; + border-left-color: #999; // IE8 fallback + border-left-color: @popoverArrowOuterColor; + &:after { + right: 1px; + border-right-width: 0; + border-left-color: @popoverArrowColor; + bottom: -@popoverArrowWidth; + } + } + +} diff --git a/app/assets/stylesheets/admin/framework/progress-bars.less b/app/assets/stylesheets/admin/framework/progress-bars.less new file mode 100755 index 0000000..5e0c3dd --- /dev/null +++ b/app/assets/stylesheets/admin/framework/progress-bars.less @@ -0,0 +1,122 @@ +// +// Progress bars +// -------------------------------------------------- + + +// ANIMATIONS +// ---------- + +// Webkit +@-webkit-keyframes progress-bar-stripes { + from { background-position: 40px 0; } + to { background-position: 0 0; } +} + +// Firefox +@-moz-keyframes progress-bar-stripes { + from { background-position: 40px 0; } + to { background-position: 0 0; } +} + +// IE9 +@-ms-keyframes progress-bar-stripes { + from { background-position: 40px 0; } + to { background-position: 0 0; } +} + +// Opera +@-o-keyframes progress-bar-stripes { + from { background-position: 0 0; } + to { background-position: 40px 0; } +} + +// Spec +@keyframes progress-bar-stripes { + from { background-position: 40px 0; } + to { background-position: 0 0; } +} + + + +// THE BARS +// -------- + +// Outer container +.progress { + overflow: hidden; + height: @baseLineHeight; + margin-bottom: @baseLineHeight; + #gradient > .vertical(#f5f5f5, #f9f9f9); + .box-shadow(inset 0 1px 2px rgba(0,0,0,.1)); + .border-radius(@baseBorderRadius); +} + +// Bar of progress +.progress .bar { + width: 0%; + height: 100%; + color: @white; + float: left; + font-size: 12px; + text-align: center; + text-shadow: 0 -1px 0 rgba(0,0,0,.25); + #gradient > .vertical(#149bdf, #0480be); + .box-shadow(inset 0 -1px 0 rgba(0,0,0,.15)); + .box-sizing(border-box); + .transition(width .6s ease); +} +.progress .bar + .bar { + .box-shadow(~"inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15)"); +} + +// Striped bars +.progress-striped .bar { + #gradient > .striped(#149bdf); + .background-size(40px 40px); +} + +// Call animation for the active one +.progress.active .bar { + -webkit-animation: progress-bar-stripes 2s linear infinite; + -moz-animation: progress-bar-stripes 2s linear infinite; + -ms-animation: progress-bar-stripes 2s linear infinite; + -o-animation: progress-bar-stripes 2s linear infinite; + animation: progress-bar-stripes 2s linear infinite; +} + + + +// COLORS +// ------ + +// Danger (red) +.progress-danger .bar, .progress .bar-danger { + #gradient > .vertical(#ee5f5b, #c43c35); +} +.progress-danger.progress-striped .bar, .progress-striped .bar-danger { + #gradient > .striped(#ee5f5b); +} + +// Success (green) +.progress-success .bar, .progress .bar-success { + #gradient > .vertical(#62c462, #57a957); +} +.progress-success.progress-striped .bar, .progress-striped .bar-success { + #gradient > .striped(#62c462); +} + +// Info (teal) +.progress-info .bar, .progress .bar-info { + #gradient > .vertical(#5bc0de, #339bb9); +} +.progress-info.progress-striped .bar, .progress-striped .bar-info { + #gradient > .striped(#5bc0de); +} + +// Warning (orange) +.progress-warning .bar, .progress .bar-warning { + #gradient > .vertical(lighten(@orange, 15%), @orange); +} +.progress-warning.progress-striped .bar, .progress-striped .bar-warning { + #gradient > .striped(lighten(@orange, 15%)); +} diff --git a/app/assets/stylesheets/admin/framework/reset.less b/app/assets/stylesheets/admin/framework/reset.less new file mode 100755 index 0000000..4806bd5 --- /dev/null +++ b/app/assets/stylesheets/admin/framework/reset.less @@ -0,0 +1,216 @@ +// +// Reset CSS +// Adapted from http://github.com/necolas/normalize.css +// -------------------------------------------------- + + +// Display in IE6-9 and FF3 +// ------------------------- + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +nav, +section { + display: block; +} + +// Display block in IE6-9 and FF3 +// ------------------------- + +audio, +canvas, +video { + display: inline-block; + *display: inline; + *zoom: 1; +} + +// Prevents modern browsers from displaying 'audio' without controls +// ------------------------- + +audio:not([controls]) { + display: none; +} + +// Base settings +// ------------------------- + +html { + font-size: 100%; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; +} +// Focus states +a:focus { + .tab-focus(); +} +// Hover & Active +a:hover, +a:active { + outline: 0; +} + +// Prevents sub and sup affecting line-height in all browsers +// ------------------------- + +sub, +sup { + position: relative; + font-size: 75%; + line-height: 0; + vertical-align: baseline; +} +sup { + top: -0.5em; +} +sub { + bottom: -0.25em; +} + +// Img border in a's and image quality +// ------------------------- + +img { + /* Responsive images (ensure images don't scale beyond their parents) */ + max-width: 100%; /* Part 1: Set a maxium relative to the parent */ + width: auto\9; /* IE7-8 need help adjusting responsive images */ + height: auto; /* Part 2: Scale the height according to the width, otherwise you get stretching */ + + vertical-align: middle; + border: 0; + -ms-interpolation-mode: bicubic; +} + +// Prevent max-width from affecting Google Maps +#map_canvas img, +.google-maps img { + max-width: none; +} + +// Forms +// ------------------------- + +// Font size in all browsers, margin changes, misc consistency +button, +input, +select, +textarea { + margin: 0; + font-size: 100%; + vertical-align: middle; +} +button, +input { + *overflow: visible; // Inner spacing ie IE6/7 + line-height: normal; // FF3/4 have !important on line-height in UA stylesheet +} +button::-moz-focus-inner, +input::-moz-focus-inner { // Inner padding and border oddities in FF3/4 + padding: 0; + border: 0; +} +button, +html input[type="button"], // Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` and `video` controls. +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; // Corrects inability to style clickable `input` types in iOS. + cursor: pointer; // Improves usability and consistency of cursor style between image-type `input` and others. +} +label, +select, +button, +input[type="button"], +input[type="reset"], +input[type="submit"], +input[type="radio"], +input[type="checkbox"] { + cursor: pointer; // Improves usability and consistency of cursor style between image-type `input` and others. +} +input[type="search"] { // Appearance in Safari/Chrome + .box-sizing(content-box); + -webkit-appearance: textfield; +} +input[type="search"]::-webkit-search-decoration, +input[type="search"]::-webkit-search-cancel-button { + -webkit-appearance: none; // Inner-padding issues in Chrome OSX, Safari 5 +} +textarea { + overflow: auto; // Remove vertical scrollbar in IE6-9 + vertical-align: top; // Readability and alignment cross-browser +} + + +// Printing +// ------------------------- +// Source: https://github.com/h5bp/html5-boilerplate/blob/master/css/main.css + +@media print { + + * { + text-shadow: none !important; + color: #000 !important; // Black prints faster: h5bp.com/s + background: transparent !important; + box-shadow: none !important; + } + + a, + a:visited { + text-decoration: underline; + } + + a[href]:after { + content: " (" attr(href) ")"; + } + + abbr[title]:after { + content: " (" attr(title) ")"; + } + + // Don't show links for images, or javascript/internal links + .ir a:after, + a[href^="javascript:"]:after, + a[href^="#"]:after { + content: ""; + } + + pre, + blockquote { + border: 1px solid #999; + page-break-inside: avoid; + } + + thead { + display: table-header-group; // h5bp.com/t + } + + tr, + img { + page-break-inside: avoid; + } + + img { + max-width: 100% !important; + } + + @page { + margin: 0.5cm; + } + + p, + h2, + h3 { + orphans: 3; + widows: 3; + } + + h2, + h3 { + page-break-after: avoid; + } +} diff --git a/app/assets/stylesheets/admin/framework/responsive-1200px-min.less b/app/assets/stylesheets/admin/framework/responsive-1200px-min.less new file mode 100755 index 0000000..4f35ba6 --- /dev/null +++ b/app/assets/stylesheets/admin/framework/responsive-1200px-min.less @@ -0,0 +1,28 @@ +// +// Responsive: Large desktop and up +// -------------------------------------------------- + + +@media (min-width: 1200px) { + + // Fixed grid + #grid > .core(@gridColumnWidth1200, @gridGutterWidth1200); + + // Fluid grid + #grid > .fluid(@fluidGridColumnWidth1200, @fluidGridGutterWidth1200); + + // Input grid + #grid > .input(@gridColumnWidth1200, @gridGutterWidth1200); + + // Thumbnails + .thumbnails { + margin-left: -@gridGutterWidth1200; + } + .thumbnails > li { + margin-left: @gridGutterWidth1200; + } + .row-fluid .thumbnails { + margin-left: 0; + } + +} diff --git a/app/assets/stylesheets/admin/framework/responsive-767px-max.less b/app/assets/stylesheets/admin/framework/responsive-767px-max.less new file mode 100755 index 0000000..128f4ce --- /dev/null +++ b/app/assets/stylesheets/admin/framework/responsive-767px-max.less @@ -0,0 +1,193 @@ +// +// Responsive: Landscape phone to desktop/tablet +// -------------------------------------------------- + + +@media (max-width: 767px) { + + // Padding to set content in a bit + body { + padding-left: 20px; + padding-right: 20px; + } + // Negative indent the now static "fixed" navbar + .navbar-fixed-top, + .navbar-fixed-bottom, + .navbar-static-top { + margin-left: -20px; + margin-right: -20px; + } + // Remove padding on container given explicit padding set on body + .container-fluid { + padding: 0; + } + + // TYPOGRAPHY + // ---------- + // Reset horizontal dl + .dl-horizontal { + dt { + float: none; + clear: none; + width: auto; + text-align: left; + } + dd { + margin-left: 0; + } + } + + // GRID & CONTAINERS + // ----------------- + // Remove width from containers + .container { + width: auto; + } + // Fluid rows + .row-fluid { + width: 100%; + } + // Undo negative margin on rows and thumbnails + .row, + .thumbnails { + margin-left: 0; + } + .thumbnails > li { + float: none; + margin-left: 0; // Reset the default margin for all li elements when no .span* classes are present + } + // Make all grid-sized elements block level again + [class*="span"], + .uneditable-input[class*="span"], // Makes uneditable inputs full-width when using grid sizing + .row-fluid [class*="span"] { + float: none; + display: block; + width: 100%; + margin-left: 0; + .box-sizing(border-box); + } + .span12, + .row-fluid .span12 { + width: 100%; + .box-sizing(border-box); + } + .row-fluid [class*="offset"]:first-child { + margin-left: 0; + } + + // FORM FIELDS + // ----------- + // Make span* classes full width + .input-large, + .input-xlarge, + .input-xxlarge, + input[class*="span"], + select[class*="span"], + textarea[class*="span"], + .uneditable-input { + .input-block-level(); + } + // But don't let it screw up prepend/append inputs + .input-prepend input, + .input-append input, + .input-prepend input[class*="span"], + .input-append input[class*="span"] { + display: inline-block; // redeclare so they don't wrap to new lines + width: auto; + } + .controls-row [class*="span"] + [class*="span"] { + margin-left: 0; + } + + // Modals + .modal { + position: fixed; + top: 20px; + left: 20px; + right: 20px; + width: auto; + margin: 0; + &.fade { top: -100px; } + &.fade.in { top: 20px; } + } + +} + + + +// UP TO LANDSCAPE PHONE +// --------------------- + +@media (max-width: 480px) { + + // Smooth out the collapsing/expanding nav + .nav-collapse { + -webkit-transform: translate3d(0, 0, 0); // activate the GPU + } + + // Block level the page header small tag for readability + .page-header h1 small { + display: block; + line-height: @baseLineHeight; + } + + // Update checkboxes for iOS + input[type="checkbox"], + input[type="radio"] { + border: 1px solid #ccc; + } + + // Remove the horizontal form styles + .form-horizontal { + .control-label { + float: none; + width: auto; + padding-top: 0; + text-align: left; + } + // Move over all input controls and content + .controls { + margin-left: 0; + } + // Move the options list down to align with labels + .control-list { + padding-top: 0; // has to be padding because margin collaspes + } + // Move over buttons in .form-actions to align with .controls + .form-actions { + padding-left: 10px; + padding-right: 10px; + } + } + + // Medias + // Reset float and spacing to stack + .media .pull-left, + .media .pull-right { + float: none; + display: block; + margin-bottom: 10px; + } + // Remove side margins since we stack instead of indent + .media-object { + margin-right: 0; + margin-left: 0; + } + + // Modals + .modal { + top: 10px; + left: 10px; + right: 10px; + } + .modal-header .close { + padding: 10px; + margin: -10px; + } + + // Carousel + .carousel-caption { + position: static; + } + +} diff --git a/app/assets/stylesheets/admin/framework/responsive-768px-979px.less b/app/assets/stylesheets/admin/framework/responsive-768px-979px.less new file mode 100755 index 0000000..8e8c486 --- /dev/null +++ b/app/assets/stylesheets/admin/framework/responsive-768px-979px.less @@ -0,0 +1,19 @@ +// +// Responsive: Tablet to desktop +// -------------------------------------------------- + + +@media (min-width: 768px) and (max-width: 979px) { + + // Fixed grid + #grid > .core(@gridColumnWidth768, @gridGutterWidth768); + + // Fluid grid + #grid > .fluid(@fluidGridColumnWidth768, @fluidGridGutterWidth768); + + // Input grid + #grid > .input(@gridColumnWidth768, @gridGutterWidth768); + + // No need to reset .thumbnails here since it's the same @gridGutterWidth + +} diff --git a/app/assets/stylesheets/admin/framework/responsive-navbar.less b/app/assets/stylesheets/admin/framework/responsive-navbar.less new file mode 100755 index 0000000..21cd3ba --- /dev/null +++ b/app/assets/stylesheets/admin/framework/responsive-navbar.less @@ -0,0 +1,189 @@ +// +// Responsive: Navbar +// -------------------------------------------------- + + +// TABLETS AND BELOW +// ----------------- +@media (max-width: @navbarCollapseWidth) { + + // UNFIX THE TOPBAR + // ---------------- + // Remove any padding from the body + body { + padding-top: 0; + } + // Unfix the navbars + .navbar-fixed-top, + .navbar-fixed-bottom { + position: static; + } + .navbar-fixed-top { + margin-bottom: @baseLineHeight; + } + .navbar-fixed-bottom { + margin-top: @baseLineHeight; + } + .navbar-fixed-top .navbar-inner, + .navbar-fixed-bottom .navbar-inner { + padding: 5px; + } + .navbar .container { + width: auto; + padding: 0; + } + // Account for brand name + .navbar .brand { + padding-left: 10px; + padding-right: 10px; + margin: 0 0 0 -5px; + } + + // COLLAPSIBLE NAVBAR + // ------------------ + // Nav collapse clears brand + .nav-collapse { + clear: both; + } + // Block-level the nav + .nav-collapse .nav { + float: none; + margin: 0 0 (@baseLineHeight / 2); + } + .nav-collapse .nav > li { + float: none; + } + .nav-collapse .nav > li > a { + margin-bottom: 2px; + } + .nav-collapse .nav > .divider-vertical { + display: none; + } + .nav-collapse .nav .nav-header { + color: @navbarText; + text-shadow: none; + } + // Nav and dropdown links in navbar + .nav-collapse .nav > li > a, + .nav-collapse .dropdown-menu a { + padding: 9px 15px; + font-weight: bold; + color: @navbarLinkColor; + .border-radius(3px); + } + // Buttons + .nav-collapse .btn { + padding: 4px 10px 4px; + font-weight: normal; + .border-radius(@baseBorderRadius); + } + .nav-collapse .dropdown-menu li + li a { + margin-bottom: 2px; + } + .nav-collapse .nav > li > a:hover, + .nav-collapse .nav > li > a:focus, + .nav-collapse .dropdown-menu a:hover, + .nav-collapse .dropdown-menu a:focus { + background-color: @navbarBackground; + } + .navbar-inverse .nav-collapse .nav > li > a, + .navbar-inverse .nav-collapse .dropdown-menu a { + color: @navbarInverseLinkColor; + } + .navbar-inverse .nav-collapse .nav > li > a:hover, + .navbar-inverse .nav-collapse .nav > li > a:focus, + .navbar-inverse .nav-collapse .dropdown-menu a:hover, + .navbar-inverse .nav-collapse .dropdown-menu a:focus { + background-color: @navbarInverseBackground; + } + // Buttons in the navbar + .nav-collapse.in .btn-group { + margin-top: 5px; + padding: 0; + } + // Dropdowns in the navbar + .nav-collapse .dropdown-menu { + position: static; + top: auto; + left: auto; + float: none; + display: none; + max-width: none; + margin: 0 15px; + padding: 0; + background-color: transparent; + border: none; + .border-radius(0); + .box-shadow(none); + } + .nav-collapse .open > .dropdown-menu { + display: block; + } + + .nav-collapse .dropdown-menu:before, + .nav-collapse .dropdown-menu:after { + display: none; + } + .nav-collapse .dropdown-menu .divider { + display: none; + } + .nav-collapse .nav > li > .dropdown-menu { + &:before, + &:after { + display: none; + } + } + // Forms in navbar + .nav-collapse .navbar-form, + .nav-collapse .navbar-search { + float: none; + padding: (@baseLineHeight / 2) 15px; + margin: (@baseLineHeight / 2) 0; + border-top: 1px solid @navbarBackground; + border-bottom: 1px solid @navbarBackground; + .box-shadow(~"inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1)"); + } + .navbar-inverse .nav-collapse .navbar-form, + .navbar-inverse .nav-collapse .navbar-search { + border-top-color: @navbarInverseBackground; + border-bottom-color: @navbarInverseBackground; + } + // Pull right (secondary) nav content + .navbar .nav-collapse .nav.pull-right { + float: none; + margin-left: 0; + } + // Hide everything in the navbar save .brand and toggle button */ + .nav-collapse, + .nav-collapse.collapse { + overflow: hidden; + height: 0; + } + // Navbar button + .navbar .btn-navbar { + display: block; + } + + // STATIC NAVBAR + // ------------- + .navbar-static .navbar-inner { + padding-left: 10px; + padding-right: 10px; + } + + +} + + +// DEFAULT DESKTOP +// --------------- + +@media (min-width: @navbarCollapseDesktopWidth) { + + // Required to make the collapsing navbar work on regular desktops + .nav-collapse.collapse { + height: auto !important; + overflow: visible !important; + } + +} diff --git a/app/assets/stylesheets/admin/framework/responsive-utilities.less b/app/assets/stylesheets/admin/framework/responsive-utilities.less new file mode 100755 index 0000000..bf43e8e --- /dev/null +++ b/app/assets/stylesheets/admin/framework/responsive-utilities.less @@ -0,0 +1,59 @@ +// +// Responsive: Utility classes +// -------------------------------------------------- + + +// IE10 Metro responsive +// Required for Windows 8 Metro split-screen snapping with IE10 +// Source: http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/ +@-ms-viewport{ + width: device-width; +} + +// Hide from screenreaders and browsers +// Credit: HTML5 Boilerplate +.hidden { + display: none; + visibility: hidden; +} + +// Visibility utilities + +// For desktops +.visible-phone { display: none !important; } +.visible-tablet { display: none !important; } +.hidden-phone { } +.hidden-tablet { } +.hidden-desktop { display: none !important; } +.visible-desktop { display: inherit !important; } + +// Tablets & small desktops only +@media (min-width: 768px) and (max-width: 979px) { + // Hide everything else + .hidden-desktop { display: inherit !important; } + .visible-desktop { display: none !important ; } + // Show + .visible-tablet { display: inherit !important; } + // Hide + .hidden-tablet { display: none !important; } +} + +// Phones only +@media (max-width: 767px) { + // Hide everything else + .hidden-desktop { display: inherit !important; } + .visible-desktop { display: none !important; } + // Show + .visible-phone { display: inherit !important; } // Use inherit to restore previous behavior + // Hide + .hidden-phone { display: none !important; } +} + +// Print utilities +.visible-print { display: none !important; } +.hidden-print { } + +@media print { + .visible-print { display: inherit !important; } + .hidden-print { display: none !important; } +} diff --git a/app/assets/stylesheets/admin/framework/responsive.less b/app/assets/stylesheets/admin/framework/responsive.less new file mode 100755 index 0000000..9e5f9b1 --- /dev/null +++ b/app/assets/stylesheets/admin/framework/responsive.less @@ -0,0 +1,48 @@ +/*! + * Bootstrap Responsive v2.3.2 + * + * Copyright 2012 Twitter, Inc + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Designed and built with all the love in the world @twitter by @mdo and @fat. + */ + + +// Responsive.less +// For phone and tablet devices +// ------------------------------------------------------------- + + +// REPEAT VARIABLES & MIXINS +// ------------------------- +// Required since we compile the responsive stuff separately + +@import "variables.less"; // Modify this for custom colors, font-sizes, etc +@import "mixins.less"; + + +// RESPONSIVE CLASSES +// ------------------ + +@import "responsive-utilities.less"; + + +// MEDIA QUERIES +// ------------------ + +// Large desktops +@import "responsive-1200px-min.less"; + +// Tablets to regular desktops +@import "responsive-768px-979px.less"; + +// Phones to portrait tablets and narrow desktops +@import "responsive-767px-max.less"; + + +// RESPONSIVE NAVBAR +// ------------------ + +// From 979px and below, show a button to toggle navbar contents +@import "responsive-navbar.less"; diff --git a/app/assets/stylesheets/admin/framework/scaffolding.less b/app/assets/stylesheets/admin/framework/scaffolding.less new file mode 100755 index 0000000..f17e8ca --- /dev/null +++ b/app/assets/stylesheets/admin/framework/scaffolding.less @@ -0,0 +1,53 @@ +// +// Scaffolding +// -------------------------------------------------- + + +// Body reset +// ------------------------- + +body { + margin: 0; + font-family: @baseFontFamily; + font-size: @baseFontSize; + line-height: @baseLineHeight; + color: @textColor; + background-color: @bodyBackground; +} + + +// Links +// ------------------------- + +a { + color: @linkColor; + text-decoration: none; +} +a:hover, +a:focus { + color: @linkColorHover; + text-decoration: underline; +} + + +// Images +// ------------------------- + +// Rounded corners +.img-rounded { + .border-radius(6px); +} + +// Add polaroid-esque trim +.img-polaroid { + padding: 4px; + background-color: #fff; + border: 1px solid #ccc; + border: 1px solid rgba(0,0,0,.2); + .box-shadow(0 1px 3px rgba(0,0,0,.1)); +} + +// Perfect circle +.img-circle { + .border-radius(500px); // crank the border-radius so it works with most reasonably sized images +} diff --git a/app/assets/stylesheets/admin/framework/slider.less b/app/assets/stylesheets/admin/framework/slider.less new file mode 100755 index 0000000..2dc9c85 --- /dev/null +++ b/app/assets/stylesheets/admin/framework/slider.less @@ -0,0 +1,104 @@ +/*! + * Slider for Bootstrap + * + * Copyright 2012 Stefan Petre + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + */ + +.slider { + display: inline-block; + vertical-align: middle; + position: relative; + &.slider-horizontal { + width: 210px; + height: @baseLineHeight; + .slider-track { + height: @baseLineHeight/2; + width: 100%; + margin-top: -@baseLineHeight/4; + top: 50%; + left: 0; + } + .slider-selection { + height: 100%; + top: 0; + bottom: 0; + } + .slider-handle { + margin-left: -@baseLineHeight/2; + margin-top: -@baseLineHeight/4; + &.triangle { + border-width: 0 @baseLineHeight/2 @baseLineHeight/2 @baseLineHeight/2; + width: 0; + height: 0; + border-bottom-color: #0480be; + margin-top: 0; + } + } + } + &.slider-vertical { + height: 210px; + width: @baseLineHeight; + .slider-track { + width: @baseLineHeight/2; + height: 100%; + margin-left: -@baseLineHeight/4; + left: 50%; + top: 0; + } + .slider-selection { + width: 100%; + left: 0; + top: 0; + bottom: 0; + } + .slider-handle { + margin-left: -@baseLineHeight/4; + margin-top: -@baseLineHeight/2; + &.triangle { + border-width: @baseLineHeight/2 0 @baseLineHeight/2 @baseLineHeight/2; + width: 1px; + height: 1px; + border-left-color: #0480be; + margin-left: 0; + } + } + } + input { + display: none; + } + .tooltip-inner { + white-space: nowrap; + } +} +.slider-track { + position: absolute; + cursor: pointer; + #gradient > .vertical(#f5f5f5, #f9f9f9); + .box-shadow(inset 0 1px 2px rgba(0,0,0,.1)); + .border-radius(@baseBorderRadius); +} +.slider-selection { + position: absolute; + #gradient > .vertical(#f9f9f9, #f5f5f5); + .box-shadow(inset 0 -1px 0 rgba(0,0,0,.15)); + .box-sizing(border-box); + .border-radius(@baseBorderRadius); +} +.slider-handle { + position: absolute; + width: @baseLineHeight; + height: @baseLineHeight; + #gradient > .vertical(#149bdf, #0480be); + .box-shadow(~"inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05)"); + opacity: 0.8; + border: 0px solid transparent; + &.round { + .border-radius(@baseLineHeight); + } + &.triangle { + background: transparent none; + } +} \ No newline at end of file diff --git a/app/assets/stylesheets/admin/framework/sprites.less b/app/assets/stylesheets/admin/framework/sprites.less new file mode 100755 index 0000000..1812bf7 --- /dev/null +++ b/app/assets/stylesheets/admin/framework/sprites.less @@ -0,0 +1,197 @@ +// +// Sprites +// -------------------------------------------------- + + +// ICONS +// ----- + +// All icons receive the styles of the tag with a base class +// of .i and are then given a unique class to add width, height, +// and background-position. Your resulting HTML will look like +// . + +// For the white version of the icons, just add the .icon-white class: +// + +[class^="icon-"], +[class*=" icon-"] { + display: inline-block; + width: 14px; + height: 14px; + .ie7-restore-right-whitespace(); + line-height: 14px; + vertical-align: text-top; + background-image: url("@{iconSpritePath}"); + background-position: 14px 14px; + background-repeat: no-repeat; + margin-top: 1px; +} + +/* White icons with optional class, or on hover/focus/active states of certain elements */ +.icon-white, +.nav-pills > .active > a > [class^="icon-"], +.nav-pills > .active > a > [class*=" icon-"], +.nav-list > .active > a > [class^="icon-"], +.nav-list > .active > a > [class*=" icon-"], +.navbar-inverse .nav > .active > a > [class^="icon-"], +.navbar-inverse .nav > .active > a > [class*=" icon-"], +.dropdown-menu > li > a:hover > [class^="icon-"], +.dropdown-menu > li > a:focus > [class^="icon-"], +.dropdown-menu > li > a:hover > [class*=" icon-"], +.dropdown-menu > li > a:focus > [class*=" icon-"], +.dropdown-menu > .active > a > [class^="icon-"], +.dropdown-menu > .active > a > [class*=" icon-"], +.dropdown-submenu:hover > a > [class^="icon-"], +.dropdown-submenu:focus > a > [class^="icon-"], +.dropdown-submenu:hover > a > [class*=" icon-"], +.dropdown-submenu:focus > a > [class*=" icon-"] { + background-image: url("@{iconWhiteSpritePath}"); +} + +.icon-glass { background-position: 0 0; } +.icon-music { background-position: -24px 0; } +.icon-search { background-position: -48px 0; } +.icon-envelope { background-position: -72px 0; } +.icon-heart { background-position: -96px 0; } +.icon-star { background-position: -120px 0; } +.icon-star-empty { background-position: -144px 0; } +.icon-user { background-position: -168px 0; } +.icon-film { background-position: -192px 0; } +.icon-th-large { background-position: -216px 0; } +.icon-th { background-position: -240px 0; } +.icon-th-list { background-position: -264px 0; } +.icon-ok { background-position: -288px 0; } +.icon-remove { background-position: -312px 0; } +.icon-zoom-in { background-position: -336px 0; } +.icon-zoom-out { background-position: -360px 0; } +.icon-off { background-position: -384px 0; } +.icon-signal { background-position: -408px 0; } +.icon-cog { background-position: -432px 0; } +.icon-trash { background-position: -456px 0; } + +.icon-home { background-position: 0 -24px; } +.icon-file { background-position: -24px -24px; } +.icon-time { background-position: -48px -24px; } +.icon-road { background-position: -72px -24px; } +.icon-download-alt { background-position: -96px -24px; } +.icon-download { background-position: -120px -24px; } +.icon-upload { background-position: -144px -24px; } +.icon-inbox { background-position: -168px -24px; } +.icon-play-circle { background-position: -192px -24px; } +.icon-repeat { background-position: -216px -24px; } +.icon-refresh { background-position: -240px -24px; } +.icon-list-alt { background-position: -264px -24px; } +.icon-lock { background-position: -287px -24px; } // 1px off +.icon-flag { background-position: -312px -24px; } +.icon-headphones { background-position: -336px -24px; } +.icon-volume-off { background-position: -360px -24px; } +.icon-volume-down { background-position: -384px -24px; } +.icon-volume-up { background-position: -408px -24px; } +.icon-qrcode { background-position: -432px -24px; } +.icon-barcode { background-position: -456px -24px; } + +.icon-tag { background-position: 0 -48px; } +.icon-tags { background-position: -25px -48px; } // 1px off +.icon-book { background-position: -48px -48px; } +.icon-bookmark { background-position: -72px -48px; } +.icon-print { background-position: -96px -48px; } +.icon-camera { background-position: -120px -48px; } +.icon-font { background-position: -144px -48px; } +.icon-bold { background-position: -167px -48px; } // 1px off +.icon-italic { background-position: -192px -48px; } +.icon-text-height { background-position: -216px -48px; } +.icon-text-width { background-position: -240px -48px; } +.icon-align-left { background-position: -264px -48px; } +.icon-align-center { background-position: -288px -48px; } +.icon-align-right { background-position: -312px -48px; } +.icon-align-justify { background-position: -336px -48px; } +.icon-list { background-position: -360px -48px; } +.icon-indent-left { background-position: -384px -48px; } +.icon-indent-right { background-position: -408px -48px; } +.icon-facetime-video { background-position: -432px -48px; } +.icon-picture { background-position: -456px -48px; } + +.icon-pencil { background-position: 0 -72px; } +.icon-map-marker { background-position: -24px -72px; } +.icon-adjust { background-position: -48px -72px; } +.icon-tint { background-position: -72px -72px; } +.icon-edit { background-position: -96px -72px; } +.icon-share { background-position: -120px -72px; } +.icon-check { background-position: -144px -72px; } +.icon-move { background-position: -168px -72px; } +.icon-step-backward { background-position: -192px -72px; } +.icon-fast-backward { background-position: -216px -72px; } +.icon-backward { background-position: -240px -72px; } +.icon-play { background-position: -264px -72px; } +.icon-pause { background-position: -288px -72px; } +.icon-stop { background-position: -312px -72px; } +.icon-forward { background-position: -336px -72px; } +.icon-fast-forward { background-position: -360px -72px; } +.icon-step-forward { background-position: -384px -72px; } +.icon-eject { background-position: -408px -72px; } +.icon-chevron-left { background-position: -432px -72px; } +.icon-chevron-right { background-position: -456px -72px; } + +.icon-plus-sign { background-position: 0 -96px; } +.icon-minus-sign { background-position: -24px -96px; } +.icon-remove-sign { background-position: -48px -96px; } +.icon-ok-sign { background-position: -72px -96px; } +.icon-question-sign { background-position: -96px -96px; } +.icon-info-sign { background-position: -120px -96px; } +.icon-screenshot { background-position: -144px -96px; } +.icon-remove-circle { background-position: -168px -96px; } +.icon-ok-circle { background-position: -192px -96px; } +.icon-ban-circle { background-position: -216px -96px; } +.icon-arrow-left { background-position: -240px -96px; } +.icon-arrow-right { background-position: -264px -96px; } +.icon-arrow-up { background-position: -289px -96px; } // 1px off +.icon-arrow-down { background-position: -312px -96px; } +.icon-share-alt { background-position: -336px -96px; } +.icon-resize-full { background-position: -360px -96px; } +.icon-resize-small { background-position: -384px -96px; } +.icon-plus { background-position: -408px -96px; } +.icon-minus { background-position: -433px -96px; } +.icon-asterisk { background-position: -456px -96px; } + +.icon-exclamation-sign { background-position: 0 -120px; } +.icon-gift { background-position: -24px -120px; } +.icon-leaf { background-position: -48px -120px; } +.icon-fire { background-position: -72px -120px; } +.icon-eye-open { background-position: -96px -120px; } +.icon-eye-close { background-position: -120px -120px; } +.icon-warning-sign { background-position: -144px -120px; } +.icon-plane { background-position: -168px -120px; } +.icon-calendar { background-position: -192px -120px; } +.icon-random { background-position: -216px -120px; width: 16px; } +.icon-comment { background-position: -240px -120px; } +.icon-magnet { background-position: -264px -120px; } +.icon-chevron-up { background-position: -288px -120px; } +.icon-chevron-down { background-position: -313px -119px; } // 1px, 1px off +.icon-retweet { background-position: -336px -120px; } +.icon-shopping-cart { background-position: -360px -120px; } +.icon-folder-close { background-position: -384px -120px; width: 16px; } +.icon-folder-open { background-position: -408px -120px; width: 16px; } +.icon-resize-vertical { background-position: -432px -119px; } // 1px, 1px off +.icon-resize-horizontal { background-position: -456px -118px; } // 1px, 2px off + +.icon-hdd { background-position: 0 -144px; } +.icon-bullhorn { background-position: -24px -144px; } +.icon-bell { background-position: -48px -144px; } +.icon-certificate { background-position: -72px -144px; } +.icon-thumbs-up { background-position: -96px -144px; } +.icon-thumbs-down { background-position: -120px -144px; } +.icon-hand-right { background-position: -144px -144px; } +.icon-hand-left { background-position: -168px -144px; } +.icon-hand-up { background-position: -192px -144px; } +.icon-hand-down { background-position: -216px -144px; } +.icon-circle-arrow-right { background-position: -240px -144px; } +.icon-circle-arrow-left { background-position: -264px -144px; } +.icon-circle-arrow-up { background-position: -288px -144px; } +.icon-circle-arrow-down { background-position: -312px -144px; } +.icon-globe { background-position: -336px -144px; } +.icon-wrench { background-position: -360px -144px; } +.icon-tasks { background-position: -384px -144px; } +.icon-filter { background-position: -408px -144px; } +.icon-briefcase { background-position: -432px -144px; } +.icon-fullscreen { background-position: -456px -144px; } diff --git a/app/assets/stylesheets/admin/framework/tables.less b/app/assets/stylesheets/admin/framework/tables.less new file mode 100755 index 0000000..0e35271 --- /dev/null +++ b/app/assets/stylesheets/admin/framework/tables.less @@ -0,0 +1,244 @@ +// +// Tables +// -------------------------------------------------- + + +// BASE TABLES +// ----------------- + +table { + max-width: 100%; + background-color: @tableBackground; + border-collapse: collapse; + border-spacing: 0; +} + +// BASELINE STYLES +// --------------- + +.table { + width: 100%; + margin-bottom: @baseLineHeight; + // Cells + th, + td { + padding: 8px; + line-height: @baseLineHeight; + text-align: left; + vertical-align: top; + border-top: 1px solid @tableBorder; + } + th { + font-weight: bold; + } + // Bottom align for column headings + thead th { + vertical-align: bottom; + } + // Remove top border from thead by default + caption + thead tr:first-child th, + caption + thead tr:first-child td, + colgroup + thead tr:first-child th, + colgroup + thead tr:first-child td, + thead:first-child tr:first-child th, + thead:first-child tr:first-child td { + border-top: 0; + } + // Account for multiple tbody instances + tbody + tbody { + border-top: 2px solid @tableBorder; + } + + // Nesting + .table { + background-color: @bodyBackground; + } +} + + + +// CONDENSED TABLE W/ HALF PADDING +// ------------------------------- + +.table-condensed { + th, + td { + padding: 4px 5px; + } +} + + +// BORDERED VERSION +// ---------------- + +.table-bordered { + border: 1px solid @tableBorder; + border-collapse: separate; // Done so we can round those corners! + *border-collapse: collapse; // IE7 can't round corners anyway + border-left: 0; + .border-radius(@baseBorderRadius); + th, + td { + border-left: 1px solid @tableBorder; + } + // Prevent a double border + caption + thead tr:first-child th, + caption + tbody tr:first-child th, + caption + tbody tr:first-child td, + colgroup + thead tr:first-child th, + colgroup + tbody tr:first-child th, + colgroup + tbody tr:first-child td, + thead:first-child tr:first-child th, + tbody:first-child tr:first-child th, + tbody:first-child tr:first-child td { + border-top: 0; + } + // For first th/td in the first row in the first thead or tbody + thead:first-child tr:first-child > th:first-child, + tbody:first-child tr:first-child > td:first-child, + tbody:first-child tr:first-child > th:first-child { + .border-top-left-radius(@baseBorderRadius); + } + // For last th/td in the first row in the first thead or tbody + thead:first-child tr:first-child > th:last-child, + tbody:first-child tr:first-child > td:last-child, + tbody:first-child tr:first-child > th:last-child { + .border-top-right-radius(@baseBorderRadius); + } + // For first th/td (can be either) in the last row in the last thead, tbody, and tfoot + thead:last-child tr:last-child > th:first-child, + tbody:last-child tr:last-child > td:first-child, + tbody:last-child tr:last-child > th:first-child, + tfoot:last-child tr:last-child > td:first-child, + tfoot:last-child tr:last-child > th:first-child { + .border-bottom-left-radius(@baseBorderRadius); + } + // For last th/td (can be either) in the last row in the last thead, tbody, and tfoot + thead:last-child tr:last-child > th:last-child, + tbody:last-child tr:last-child > td:last-child, + tbody:last-child tr:last-child > th:last-child, + tfoot:last-child tr:last-child > td:last-child, + tfoot:last-child tr:last-child > th:last-child { + .border-bottom-right-radius(@baseBorderRadius); + } + + // Clear border-radius for first and last td in the last row in the last tbody for table with tfoot + tfoot + tbody:last-child tr:last-child td:first-child { + .border-bottom-left-radius(0); + } + tfoot + tbody:last-child tr:last-child td:last-child { + .border-bottom-right-radius(0); + } + + // Special fixes to round the left border on the first td/th + caption + thead tr:first-child th:first-child, + caption + tbody tr:first-child td:first-child, + colgroup + thead tr:first-child th:first-child, + colgroup + tbody tr:first-child td:first-child { + .border-top-left-radius(@baseBorderRadius); + } + caption + thead tr:first-child th:last-child, + caption + tbody tr:first-child td:last-child, + colgroup + thead tr:first-child th:last-child, + colgroup + tbody tr:first-child td:last-child { + .border-top-right-radius(@baseBorderRadius); + } + +} + + + + +// ZEBRA-STRIPING +// -------------- + +// Default zebra-stripe styles (alternating gray and transparent backgrounds) +.table-striped { + tbody { + > tr:nth-child(odd) > td, + > tr:nth-child(odd) > th { + background-color: @tableBackgroundAccent; + } + } +} + + +// HOVER EFFECT +// ------------ +// Placed here since it has to come after the potential zebra striping +.table-hover { + tbody { + tr:hover > td, + tr:hover > th { + background-color: @tableBackgroundHover; + } + } +} + + +// TABLE CELL SIZING +// ----------------- + +// Reset default grid behavior +table td[class*="span"], +table th[class*="span"], +.row-fluid table td[class*="span"], +.row-fluid table th[class*="span"] { + display: table-cell; + float: none; // undo default grid column styles + margin-left: 0; // undo default grid column styles +} + +// Change the column widths to account for td/th padding +.table td, +.table th { + &.span1 { .tableColumns(1); } + &.span2 { .tableColumns(2); } + &.span3 { .tableColumns(3); } + &.span4 { .tableColumns(4); } + &.span5 { .tableColumns(5); } + &.span6 { .tableColumns(6); } + &.span7 { .tableColumns(7); } + &.span8 { .tableColumns(8); } + &.span9 { .tableColumns(9); } + &.span10 { .tableColumns(10); } + &.span11 { .tableColumns(11); } + &.span12 { .tableColumns(12); } +} + + + +// TABLE BACKGROUNDS +// ----------------- +// Exact selectors below required to override .table-striped + +.table tbody tr { + &.success > td { + background-color: @successBackground; + } + &.error > td { + background-color: @errorBackground; + } + &.warning > td { + background-color: @warningBackground; + } + &.info > td { + background-color: @infoBackground; + } +} + +// Hover states for .table-hover +.table-hover tbody tr { + &.success:hover > td { + background-color: darken(@successBackground, 5%); + } + &.error:hover > td { + background-color: darken(@errorBackground, 5%); + } + &.warning:hover > td { + background-color: darken(@warningBackground, 5%); + } + &.info:hover > td { + background-color: darken(@infoBackground, 5%); + } +} diff --git a/app/assets/stylesheets/admin/framework/thumbnails.less b/app/assets/stylesheets/admin/framework/thumbnails.less new file mode 100755 index 0000000..4fd07d2 --- /dev/null +++ b/app/assets/stylesheets/admin/framework/thumbnails.less @@ -0,0 +1,53 @@ +// +// Thumbnails +// -------------------------------------------------- + + +// Note: `.thumbnails` and `.thumbnails > li` are overriden in responsive files + +// Make wrapper ul behave like the grid +.thumbnails { + margin-left: -@gridGutterWidth; + list-style: none; + .clearfix(); +} +// Fluid rows have no left margin +.row-fluid .thumbnails { + margin-left: 0; +} + +// Float li to make thumbnails appear in a row +.thumbnails > li { + float: left; // Explicity set the float since we don't require .span* classes + margin-bottom: @baseLineHeight; + margin-left: @gridGutterWidth; +} + +// The actual thumbnail (can be `a` or `div`) +.thumbnail { + display: block; + padding: 4px; + line-height: @baseLineHeight; + border: 1px solid #ddd; + .border-radius(@baseBorderRadius); + .box-shadow(0 1px 3px rgba(0,0,0,.055)); + .transition(all .2s ease-in-out); +} +// Add a hover/focus state for linked versions only +a.thumbnail:hover, +a.thumbnail:focus { + border-color: @linkColor; + .box-shadow(0 1px 4px rgba(0,105,214,.25)); +} + +// Images and captions +.thumbnail > img { + display: block; + max-width: 100%; + margin-left: auto; + margin-right: auto; +} +.thumbnail .caption { + padding: 9px; + color: @gray; +} diff --git a/app/assets/stylesheets/admin/framework/tooltip.less b/app/assets/stylesheets/admin/framework/tooltip.less new file mode 100755 index 0000000..83d5f2b --- /dev/null +++ b/app/assets/stylesheets/admin/framework/tooltip.less @@ -0,0 +1,70 @@ +// +// Tooltips +// -------------------------------------------------- + + +// Base class +.tooltip { + position: absolute; + z-index: @zindexTooltip; + display: block; + visibility: visible; + font-size: 11px; + line-height: 1.4; + .opacity(0); + &.in { .opacity(80); } + &.top { margin-top: -3px; padding: 5px 0; } + &.right { margin-left: 3px; padding: 0 5px; } + &.bottom { margin-top: 3px; padding: 5px 0; } + &.left { margin-left: -3px; padding: 0 5px; } +} + +// Wrapper for the tooltip content +.tooltip-inner { + max-width: 200px; + padding: 8px; + color: @tooltipColor; + text-align: center; + text-decoration: none; + background-color: @tooltipBackground; + .border-radius(@baseBorderRadius); +} + +// Arrows +.tooltip-arrow { + position: absolute; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} +.tooltip { + &.top .tooltip-arrow { + bottom: 0; + left: 50%; + margin-left: -@tooltipArrowWidth; + border-width: @tooltipArrowWidth @tooltipArrowWidth 0; + border-top-color: @tooltipArrowColor; + } + &.right .tooltip-arrow { + top: 50%; + left: 0; + margin-top: -@tooltipArrowWidth; + border-width: @tooltipArrowWidth @tooltipArrowWidth @tooltipArrowWidth 0; + border-right-color: @tooltipArrowColor; + } + &.left .tooltip-arrow { + top: 50%; + right: 0; + margin-top: -@tooltipArrowWidth; + border-width: @tooltipArrowWidth 0 @tooltipArrowWidth @tooltipArrowWidth; + border-left-color: @tooltipArrowColor; + } + &.bottom .tooltip-arrow { + top: 0; + left: 50%; + margin-left: -@tooltipArrowWidth; + border-width: 0 @tooltipArrowWidth @tooltipArrowWidth; + border-bottom-color: @tooltipArrowColor; + } +} diff --git a/app/assets/stylesheets/admin/framework/type.less b/app/assets/stylesheets/admin/framework/type.less new file mode 100755 index 0000000..337138a --- /dev/null +++ b/app/assets/stylesheets/admin/framework/type.less @@ -0,0 +1,247 @@ +// +// Typography +// -------------------------------------------------- + + +// Body text +// ------------------------- + +p { + margin: 0 0 @baseLineHeight / 2; +} +.lead { + margin-bottom: @baseLineHeight; + font-size: @baseFontSize * 1.5; + font-weight: 200; + line-height: @baseLineHeight * 1.5; +} + + +// Emphasis & misc +// ------------------------- + +// Ex: 14px base font * 85% = about 12px +small { font-size: 85%; } + +strong { font-weight: bold; } +em { font-style: italic; } +cite { font-style: normal; } + +// Utility classes +.muted { color: @grayLight; } +a.muted:hover, +a.muted:focus { color: darken(@grayLight, 10%); } + +.text-warning { color: @warningText; } +a.text-warning:hover, +a.text-warning:focus { color: darken(@warningText, 10%); } + +.text-error { color: @errorText; } +a.text-error:hover, +a.text-error:focus { color: darken(@errorText, 10%); } + +.text-info { color: @infoText; } +a.text-info:hover, +a.text-info:focus { color: darken(@infoText, 10%); } + +.text-success { color: @successText; } +a.text-success:hover, +a.text-success:focus { color: darken(@successText, 10%); } + +.text-left { text-align: left; } +.text-right { text-align: right; } +.text-center { text-align: center; } + + +// Headings +// ------------------------- + +h1, h2, h3, h4, h5, h6 { + margin: (@baseLineHeight / 2) 0; + font-family: @headingsFontFamily; + font-weight: @headingsFontWeight; + line-height: @baseLineHeight; + color: @headingsColor; + text-rendering: optimizelegibility; // Fix the character spacing for headings + small { + font-weight: normal; + line-height: 1; + color: @grayLight; + } +} + +h1, +h2, +h3 { line-height: @baseLineHeight * 2; } + +h1 { font-size: @baseFontSize * 2.75; } // ~38px +h2 { font-size: @baseFontSize * 2.25; } // ~32px +h3 { font-size: @baseFontSize * 1.75; } // ~24px +h4 { font-size: @baseFontSize * 1.25; } // ~18px +h5 { font-size: @baseFontSize; } +h6 { font-size: @baseFontSize * 0.85; } // ~12px + +h1 small { font-size: @baseFontSize * 1.75; } // ~24px +h2 small { font-size: @baseFontSize * 1.25; } // ~18px +h3 small { font-size: @baseFontSize; } +h4 small { font-size: @baseFontSize; } + + +// Page header +// ------------------------- + +.page-header { + padding-bottom: (@baseLineHeight / 2) - 1; + margin: @baseLineHeight 0 (@baseLineHeight * 1.5); + border-bottom: 1px solid @grayLighter; +} + + + +// Lists +// -------------------------------------------------- + +// Unordered and Ordered lists +ul, ol { + padding: 0; + margin: 0 0 @baseLineHeight / 2 25px; +} +ul ul, +ul ol, +ol ol, +ol ul { + margin-bottom: 0; +} +li { + line-height: @baseLineHeight; +} + +// Remove default list styles +ul.unstyled, +ol.unstyled { + margin-left: 0; + list-style: none; +} + +// Single-line list items +ul.inline, +ol.inline { + margin-left: 0; + list-style: none; + > li { + display: inline-block; + .ie7-inline-block(); + padding-left: 5px; + padding-right: 5px; + } +} + +// Description Lists +dl { + margin-bottom: @baseLineHeight; +} +dt, +dd { + line-height: @baseLineHeight; +} +dt { + font-weight: bold; +} +dd { + margin-left: @baseLineHeight / 2; +} +// Horizontal layout (like forms) +.dl-horizontal { + .clearfix(); // Ensure dl clears floats if empty dd elements present + dt { + float: left; + width: @horizontalComponentOffset - 20; + clear: left; + text-align: right; + .text-overflow(); + } + dd { + margin-left: @horizontalComponentOffset; + } +} + +// MISC +// ---- + +// Horizontal rules +hr { + margin: @baseLineHeight 0; + border: 0; + border-top: 1px solid @hrBorder; + border-bottom: 1px solid @white; +} + +// Abbreviations and acronyms +abbr[title], +// Added data-* attribute to help out our tooltip plugin, per https://github.com/twitter/bootstrap/issues/5257 +abbr[data-original-title] { + cursor: help; + border-bottom: 1px dotted @grayLight; +} +abbr.initialism { + font-size: 90%; + text-transform: uppercase; +} + +// Blockquotes +blockquote { + padding: 0 0 0 15px; + margin: 0 0 @baseLineHeight; + border-left: 5px solid @grayLighter; + p { + margin-bottom: 0; + font-size: @baseFontSize * 1.25; + font-weight: 300; + line-height: 1.25; + } + small { + display: block; + line-height: @baseLineHeight; + color: @grayLight; + &:before { + content: '\2014 \00A0'; + } + } + + // Float right with text-align: right + &.pull-right { + float: right; + padding-right: 15px; + padding-left: 0; + border-right: 5px solid @grayLighter; + border-left: 0; + p, + small { + text-align: right; + } + small { + &:before { + content: ''; + } + &:after { + content: '\00A0 \2014'; + } + } + } +} + +// Quotes +q:before, +q:after, +blockquote:before, +blockquote:after { + content: ""; +} + +// Addresses +address { + display: block; + margin-bottom: @baseLineHeight; + font-style: normal; + line-height: @baseLineHeight; +} diff --git a/app/assets/stylesheets/admin/framework/utilities.less b/app/assets/stylesheets/admin/framework/utilities.less new file mode 100755 index 0000000..314b4ff --- /dev/null +++ b/app/assets/stylesheets/admin/framework/utilities.less @@ -0,0 +1,30 @@ +// +// Utility classes +// -------------------------------------------------- + + +// Quick floats +.pull-right { + float: right; +} +.pull-left { + float: left; +} + +// Toggling content +.hide { + display: none; +} +.show { + display: block; +} + +// Visibility +.invisible { + visibility: hidden; +} + +// For Affix plugin +.affix { + position: fixed; +} diff --git a/app/assets/stylesheets/admin/framework/variables.less b/app/assets/stylesheets/admin/framework/variables.less new file mode 100755 index 0000000..ad7a398 --- /dev/null +++ b/app/assets/stylesheets/admin/framework/variables.less @@ -0,0 +1,301 @@ +// +// Variables +// -------------------------------------------------- + + +// Global values +// -------------------------------------------------- + + +// Grays +// ------------------------- +@black: #000; +@grayDarker: #222; +@grayDark: #333; +@gray: #555; +@grayLight: #999; +@grayLighter: #eee; +@white: #fff; + + +// Accent colors +// ------------------------- +@blue: #049cdb; +@blueDark: #0064cd; +@green: #46a546; +@red: #9d261d; +@yellow: #ffc40d; +@orange: #f89406; +@pink: #c3325f; +@purple: #7a43b6; + + +// Scaffolding +// ------------------------- +@bodyBackground: @white; +@textColor: @grayDark; + + +// Links +// ------------------------- +@linkColor: #08c; +@linkColorHover: darken(@linkColor, 15%); + + +// Typography +// ------------------------- +@sansFontFamily: "Helvetica Neue", Helvetica, Arial, sans-serif; +@serifFontFamily: Georgia, "Times New Roman", Times, serif; +@monoFontFamily: Monaco, Menlo, Consolas, "Courier New", monospace; + +@baseFontSize: 14px; +@baseFontFamily: @sansFontFamily; +@baseLineHeight: 20px; +@altFontFamily: @serifFontFamily; + +@headingsFontFamily: "Stylograph"; // empty to use BS default, @baseFontFamily +@headingsFontWeight: 100; // instead of browser default, bold +@headingsColor: inherit; // empty to use BS default, @textColor + + +// Component sizing +// ------------------------- +// Based on 14px font-size and 20px line-height + +@fontSizeLarge: @baseFontSize * 1.25; // ~18px +@fontSizeSmall: @baseFontSize * 0.85; // ~12px +@fontSizeMini: @baseFontSize * 0.75; // ~11px + +@paddingLarge: 11px 19px; // 44px +@paddingSmall: 2px 10px; // 26px +@paddingMini: 0 6px; // 22px + +@baseBorderRadius: 4px; +@borderRadiusLarge: 6px; +@borderRadiusSmall: 3px; + + +// Tables +// ------------------------- +@tableBackground: transparent; // overall background-color +@tableBackgroundAccent: #f9f9f9; // for striping +@tableBackgroundHover: #f5f5f5; // for hover +@tableBorder: #ddd; // table and cell border + +// Buttons +// ------------------------- +@btnBackground: @white; +@btnBackgroundHighlight: darken(@white, 10%); +@btnBorder: #ccc; + +@btnPrimaryBackground: @linkColor; +@btnPrimaryBackgroundHighlight: spin(@btnPrimaryBackground, 20%); + +@btnInfoBackground: #5bc0de; +@btnInfoBackgroundHighlight: #2f96b4; + +@btnSuccessBackground: #62c462; +@btnSuccessBackgroundHighlight: #51a351; + +@btnWarningBackground: lighten(@orange, 15%); +@btnWarningBackgroundHighlight: @orange; + +@btnDangerBackground: #ee5f5b; +@btnDangerBackgroundHighlight: #bd362f; + +@btnInverseBackground: #444; +@btnInverseBackgroundHighlight: @grayDarker; + + +// Forms +// ------------------------- +@inputBackground: @white; +@inputBorder: #ccc; +@inputBorderRadius: @baseBorderRadius; +@inputDisabledBackground: @grayLighter; +@formActionsBackground: #f5f5f5; +@inputHeight: @baseLineHeight + 10px; // base line-height + 8px vertical padding + 2px top/bottom border + + +// Dropdowns +// ------------------------- +@dropdownBackground: @white; +@dropdownBorder: rgba(0,0,0,.2); +@dropdownDividerTop: #e5e5e5; +@dropdownDividerBottom: @white; + +@dropdownLinkColor: @grayDark; +@dropdownLinkColorHover: @white; +@dropdownLinkColorActive: @white; + +@dropdownLinkBackgroundActive: @linkColor; +@dropdownLinkBackgroundHover: @dropdownLinkBackgroundActive; + + + +// COMPONENT VARIABLES +// -------------------------------------------------- + + +// Z-index master list +// ------------------------- +// Used for a bird's eye view of components dependent on the z-axis +// Try to avoid customizing these :) +@zindexDropdown: 1000; +@zindexPopover: 1010; +@zindexTooltip: 1030; +@zindexFixedNavbar: 1030; +@zindexModalBackdrop: 1040; +@zindexModal: 1050; + + +// Sprite icons path +// ------------------------- +@iconSpritePath: "../img/glyphicons-halflings.png"; +@iconWhiteSpritePath: "../img/glyphicons-halflings-white.png"; + + +// Input placeholder text color +// ------------------------- +@placeholderText: @grayLight; + + +// Hr border color +// ------------------------- +@hrBorder: @grayLighter; + + +// Horizontal forms & lists +// ------------------------- +@horizontalComponentOffset: 180px; + + +// Wells +// ------------------------- +@wellBackground: #f5f5f5; + + +// Navbar +// ------------------------- +@navbarCollapseWidth: 979px; +@navbarCollapseDesktopWidth: @navbarCollapseWidth + 1; + +@navbarHeight: 40px; +@navbarBackgroundHighlight: #ffffff; +@navbarBackground: darken(@navbarBackgroundHighlight, 5%); +@navbarBorder: darken(@navbarBackground, 12%); + +@navbarText: #777; +@navbarLinkColor: #777; +@navbarLinkColorHover: @grayDark; +@navbarLinkColorActive: @gray; +@navbarLinkBackgroundHover: transparent; +@navbarLinkBackgroundActive: darken(@navbarBackground, 5%); + +@navbarBrandColor: @navbarLinkColor; + +// Inverted navbar +@navbarInverseBackground: #111111; +@navbarInverseBackgroundHighlight: #222222; +@navbarInverseBorder: #252525; + +@navbarInverseText: @grayLight; +@navbarInverseLinkColor: @grayLight; +@navbarInverseLinkColorHover: @white; +@navbarInverseLinkColorActive: @navbarInverseLinkColorHover; +@navbarInverseLinkBackgroundHover: transparent; +@navbarInverseLinkBackgroundActive: @navbarInverseBackground; + +@navbarInverseSearchBackground: lighten(@navbarInverseBackground, 25%); +@navbarInverseSearchBackgroundFocus: @white; +@navbarInverseSearchBorder: @navbarInverseBackground; +@navbarInverseSearchPlaceholderColor: #ccc; + +@navbarInverseBrandColor: @navbarInverseLinkColor; + + +// Pagination +// ------------------------- +@paginationBackground: #fff; +@paginationBorder: #ddd; +@paginationActiveBackground: #f5f5f5; + + +// Hero unit +// ------------------------- +@heroUnitBackground: @grayLighter; +@heroUnitHeadingColor: inherit; +@heroUnitLeadColor: inherit; + + +// Form states and alerts +// ------------------------- +@warningText: #c09853; +@warningBackground: #fcf8e3; +@warningBorder: darken(spin(@warningBackground, -10), 3%); + +@errorText: #b94a48; +@errorBackground: #f2dede; +@errorBorder: darken(spin(@errorBackground, -10), 3%); + +@successText: #468847; +@successBackground: #dff0d8; +@successBorder: darken(spin(@successBackground, -10), 5%); + +@infoText: #3a87ad; +@infoBackground: #d9edf7; +@infoBorder: darken(spin(@infoBackground, -10), 7%); + + +// Tooltips and popovers +// ------------------------- +@tooltipColor: #fff; +@tooltipBackground: #000; +@tooltipArrowWidth: 5px; +@tooltipArrowColor: @tooltipBackground; + +@popoverBackground: #fff; +@popoverArrowWidth: 10px; +@popoverArrowColor: #fff; +@popoverTitleBackground: darken(@popoverBackground, 3%); + +// Special enhancement for popovers +@popoverArrowOuterWidth: @popoverArrowWidth + 1; +@popoverArrowOuterColor: rgba(0,0,0,.25); + + + +// GRID +// -------------------------------------------------- + + +// Default 940px grid +// ------------------------- +@gridColumns: 12; +@gridColumnWidth: 60px; +@gridGutterWidth: 20px; +@gridRowWidth: (@gridColumns * @gridColumnWidth) + (@gridGutterWidth * (@gridColumns - 1)); + +// 1200px min +@gridColumnWidth1200: 70px; +@gridGutterWidth1200: 30px; +@gridRowWidth1200: (@gridColumns * @gridColumnWidth1200) + (@gridGutterWidth1200 * (@gridColumns - 1)); + +// 768px-979px +@gridColumnWidth768: 42px; +@gridGutterWidth768: 20px; +@gridRowWidth768: (@gridColumns * @gridColumnWidth768) + (@gridGutterWidth768 * (@gridColumns - 1)); + + +// Fluid grid +// ------------------------- +@fluidGridColumnWidth: percentage(@gridColumnWidth/@gridRowWidth); +@fluidGridGutterWidth: percentage(@gridGutterWidth/@gridRowWidth); + +// 1200px min +@fluidGridColumnWidth1200: percentage(@gridColumnWidth1200/@gridRowWidth1200); +@fluidGridGutterWidth1200: percentage(@gridGutterWidth1200/@gridRowWidth1200); + +// 768px-979px +@fluidGridColumnWidth768: percentage(@gridColumnWidth768/@gridRowWidth768); +@fluidGridGutterWidth768: percentage(@gridGutterWidth768/@gridRowWidth768); diff --git a/app/assets/stylesheets/admin/framework/wells.less b/app/assets/stylesheets/admin/framework/wells.less new file mode 100755 index 0000000..84a744b --- /dev/null +++ b/app/assets/stylesheets/admin/framework/wells.less @@ -0,0 +1,29 @@ +// +// Wells +// -------------------------------------------------- + + +// Base class +.well { + min-height: 20px; + padding: 19px; + margin-bottom: 20px; + background-color: @wellBackground; + border: 1px solid darken(@wellBackground, 7%); + .border-radius(@baseBorderRadius); + .box-shadow(inset 0 1px 1px rgba(0,0,0,.05)); + blockquote { + border-color: #ddd; + border-color: rgba(0,0,0,.15); + } +} + +// Sizes +.well-large { + padding: 24px; + .border-radius(@borderRadiusLarge); +} +.well-small { + padding: 9px; + .border-radius(@borderRadiusSmall); +} diff --git a/app/assets/stylesheets/admin/lesshat.less b/app/assets/stylesheets/admin/lesshat.less new file mode 100755 index 0000000..0658520 --- /dev/null +++ b/app/assets/stylesheets/admin/lesshat.less @@ -0,0 +1,2200 @@ +// LESS Hat 1.1.1 +// LESSHat.com +// From creators of CSSHat.com +// 2012 +// Petr Brzek & Jan Kuca + + +// @GlobalConfig + +// .animation + // .animation-delay + // .animation-direction + // .animation-duration + // .animation-fill-mode + // .animation-timing-function + // .animation-iteration-count + // .animation-name + // .animation-play-state + // .keyframes - in future +// .appearance +// .backface-visibility +// .background-clip +// .background-image +// .background-origin +// .background-size +// .border-radius + // .border-top-left-radius + // .border-top-right-radius + // .border-bottom-left-radius + // .border-bottom-right-radius +// .border-image +// .box-shadow +// .box-sizing +// .columns + // .column-count + // .column-gap + // .column-rule + // .column-width +// .font-face +// .gradient +// .opacity +// .perspective + // .perspective-origin +// .size +// .transform + // .transform-origin + // .transform-style + // .translate + // .translate3d + // .translateX + // .translateY + // .translateZ + // .scale + // .scale3d + // .scaleX + // .scaleY + // .scaleZ + // .rotate + // .rotate3d + // .rotateX + // .rotateY + // .rotateZ + // .skew + // .skewX + // .skewY +// .transition + // .transition-property + // .transition-duration + // .transition-timing-function + // .transition-delay +// .user-select +// DEPRECATED mixins + + +// @GlobalConfig + + // Config supported browsers for your project + + @w3c: true; // Unprefixed W3C syntax + @webkit: true; // Chrome 7+, Safari 5+, iOS5, Android + @moz: true; // Firefox 4+ + @opera: true; // Opera 10.5+ + @ms: true; // IE 10+ + + // Signals + + @webkitSignal: 1; + @mozSignal: 2; + @operaSignal: 3; + @msSignal: 4; + @w3cSignal: 5; + +// .animation + + .animation(...){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + @operaLocal: true; // Opera 10.5+ + @msLocal: true; // IE 10+ + + @processing: ~`(function(){ var arg = "@{arguments}".replace("[","").replace("]","") || "none"; if( !/^\w*([ X])/.test(arg) ) { arg = arg.replace(/,/g,"") } return arg; })()`; + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-animation: @processing;} + .inception (@signal, @arguments) when (@signal = 2) { -moz-animation: @processing;} + .inception (@signal, @arguments) when (@signal = 3) { -o-animation: @processing;} + .inception (@signal, @arguments) when (@signal = 4) { -ms-animation: @processing;} + .inception (@signal, @arguments) when (@signal = 5) { animation: @processing;} + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @operaSignal, @opera, @operaLocal); + // -- + .result(@arguments, @msSignal, @ms, @msLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .animation(nameAnimation 2s linear alternate anim 3s linear alternate ); } + + + // .animation-delay + + .animation-delay(...){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + @operaLocal: true; // Opera 10.5+ + @msLocal: true; // IE 10+ + + @processing: ~`(function(){ var arg = "@{arguments}" || "0"; arg = arg.replace("[","").replace("]",""); return arg; }())`; + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-animation-delay: @processing;} + .inception (@signal, @arguments) when (@signal = 2) { -moz-animation-delay: @processing;} + .inception (@signal, @arguments) when (@signal = 3) { -o-animation-delay: @processing;} + .inception (@signal, @arguments) when (@signal = 4) { -ms-animation-delay: @processing;} + .inception (@signal, @arguments) when (@signal = 5) { animation-delay: @processing;} + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @operaSignal, @opera, @operaLocal); + // -- + .result(@arguments, @msSignal, @ms, @msLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .animation-delay(1s); } + // element{ .animation-delay(750ms, 2s, 3s); } // For multiple animation-direction + + + // .animation-direction + + .animation-direction(...){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + @operaLocal: true; // Opera 10.5+ + @msLocal: true; // IE 10+ + + @processing: ~`(function(){ var arg = "@{arguments}" || "normal"; arg = arg.replace("[","").replace("]",""); return arg; }())`; + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-animation-direction: @processing;} + .inception (@signal, @arguments) when (@signal = 2) { -moz-animation-direction: @processing;} + .inception (@signal, @arguments) when (@signal = 3) { -o-animation-direction: @processing;} + .inception (@signal, @arguments) when (@signal = 4) { -ms-animation-direction: @processing;} + .inception (@signal, @arguments) when (@signal = 5) { animation-direction: @processing;} + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @operaSignal, @opera, @operaLocal); + // -- + .result(@arguments, @msSignal, @ms, @msLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .animation-direction(); } + // element{ .animation-direction(normal, alternate); } + + + // .animation-duration + + .animation-duration(...){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + @operaLocal: true; // Opera 10.5+ + @msLocal: true; // IE 10+ + + @processing: ~`(function(){ var arg = "@{arguments}" || "0"; arg = arg.replace("[","").replace("]",""); return arg; }())`; + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-animation-duration: @processing;} + .inception (@signal, @arguments) when (@signal = 2) { -moz-animation-duration: @processing;} + .inception (@signal, @arguments) when (@signal = 3) { -o-animation-duration: @processing;} + .inception (@signal, @arguments) when (@signal = 4) { -ms-animation-duration: @processing;} + .inception (@signal, @arguments) when (@signal = 5) { animation-duration: @processing;} + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @operaSignal, @opera, @operaLocal); + // -- + .result(@arguments, @msSignal, @ms, @msLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .animation-duration(2s); } + + + // .animation-fill-mode + + .animation-fill-mode(...){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + @operaLocal: true; // Opera 10.5+ + @msLocal: true; // IE 10+ + + @processing: ~`(function(){ var arg = "@{arguments}" || "none"; arg = arg.replace("[","").replace("]",""); return arg; }())`; + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-animation-fill-mode: @processing;} + .inception (@signal, @arguments) when (@signal = 2) { -moz-animation-fill-mode: @processing;} + .inception (@signal, @arguments) when (@signal = 3) { -o-animation-fill-mode: @processing;} + .inception (@signal, @arguments) when (@signal = 5) { animation-fill-mode: @processing;} + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @operaSignal, @opera, @operaLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .animation-fill-mode(forwards); } + + + // .animation-timing-function + + .animation-timing-function(...){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + @operaLocal: true; // Opera 10.5+ + @msLocal: true; // IE 10+ + + @processing: ~`(function(){ var arg = "@{arguments}" || "ease"; arg = arg.replace("[","").replace("]",""); return arg; }())`; + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-animation-timing-function: @processing;} + .inception (@signal, @arguments) when (@signal = 2) { -moz-animation-timing-function: @processing;} + .inception (@signal, @arguments) when (@signal = 3) { -o-animation-timing-function: @processing;} + .inception (@signal, @arguments) when (@signal = 4) { -ms-animation-timing-function: @processing;} + .inception (@signal, @arguments) when (@signal = 5) { animation-timing-function: @processing;} + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @operaSignal, @opera, @operaLocal); + // -- + .result(@arguments, @msSignal, @ms, @msLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .animation-timing-function(ease-in-out); } + + + // .animation-iteration-count + + .animation-iteration-count(...){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + @operaLocal: true; // Opera 10.5+ + @msLocal: true; // IE 10+ + + @processing: ~`(function(){ var arg = "@{arguments}" || "0"; arg = arg.replace("[","").replace("]",""); return arg; }())`; + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-animation-iteration-count: @processing;} + .inception (@signal, @arguments) when (@signal = 2) { -moz-animation-iteration-count: @processing;} + .inception (@signal, @arguments) when (@signal = 3) { -o-animation-iteration-count: @processing;} + .inception (@signal, @arguments) when (@signal = 4) { -ms-animation-iteration-count: @processing;} + .inception (@signal, @arguments) when (@signal = 5) { animation-iteration-count: @processing;} + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @operaSignal, @opera, @operaLocal); + // -- + .result(@arguments, @msSignal, @ms, @msLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .animation-iteration-count(3); } + + + // .animation-name + + .animation-name(...){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + @operaLocal: true; // Opera 10.5+ + @msLocal: true; // IE 10+ + + @processing: ~`(function(){ var arg = "@{arguments}" || "none"; arg = arg.replace("[","").replace("]",""); return arg; }())`; + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-animation-name: @processing;} + .inception (@signal, @arguments) when (@signal = 2) { -moz-animation-name: @processing;} + .inception (@signal, @arguments) when (@signal = 3) { -o-animation-name: @processing;} + .inception (@signal, @arguments) when (@signal = 4) { -ms-animation-name: @processing;} + .inception (@signal, @arguments) when (@signal = 5) { animation-name: @processing;} + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @operaSignal, @opera, @operaLocal); + // -- + .result(@arguments, @msSignal, @ms, @msLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .animation-name(myReallyCoolAnimationName); } + + + // .animation-play-state + + .animation-play-state(...){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + @operaLocal: true; // Opera 10.5+ + @msLocal: true; // IE 10+ + + @processing: ~`(function(){ var arg = "@{arguments}" || "running"; arg = arg.replace("[","").replace("]",""); return arg; }())`; + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-animation-play-state: @processing;} + .inception (@signal, @arguments) when (@signal = 2) { -moz-animation-play-state: @processing;} + .inception (@signal, @arguments) when (@signal = 3) { -o-animation-play-state: @processing;} + .inception (@signal, @arguments) when (@signal = 4) { -ms-animation-play-state: @processing;} + .inception (@signal, @arguments) when (@signal = 5) { animation-play-state: @processing;} + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @operaSignal, @opera, @operaLocal); + // -- + .result(@arguments, @msSignal, @ms, @msLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .animation-play-state(paused); } + + +// .appearance + + .appearance(@argument:none){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @argument) when (@signal = 1) { -webkit-appearance: @argument;} + .inception (@signal, @argument) when (@signal = 2) { -moz-appearance: @argument;} + .inception (@signal, @argument) when (@signal = 5) { appearance: @argument;} + .inception (@signal, @argument) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @argument); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .appearance(button); } + + +// .backface-visibility + + .backface-visibility(@argument:visible){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @argument) when (@signal = 1) { -webkit-backface-visibility: @argument;} + .inception (@signal, @argument) when (@signal = 2) { -moz-backface-visibility: @argument;} + .inception (@signal, @argument) when (@signal = 5) { backface-visibility: @argument;} + .inception (@signal, @argument) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @argument); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .backface-visibility(hidden); } + + +// .background-clip + + .background-clip(@arguments:border-box){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-background-clip: @arguments;} + .inception (@signal, @arguments) when (@signal = 2) { -moz-background-clip: @arguments;} + .inception (@signal, @arguments) when (@signal = 5) { background-clip: @arguments;} + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .background-clip(padding-box); } + + +// .background-image + + .background-image(...){ + + // Local config for disabling properties + + @svg: true; // SVG gradient for IE9 + @mozLocal: true; // Firefox 4+ + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5+, Android + @operaLocal: true; // Opera 10.5+ + @w3cLocal: true; // Unprefixed W3C syntax + + @backgroundSVG: ~`(function(){function K(a){var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",c,d,e,f,g,h,i,j,k=0,l=0,m="",n=[];if(!a)return a;do c=a.charCodeAt(k++),d=a.charCodeAt(k++),e=a.charCodeAt(k++),j=c<<16|d<<8|e,f=j>>18&63,g=j>>12&63,h=j>>6&63,i=j&63,n[l++]=b.charAt(f)+b.charAt(g)+b.charAt(h)+b.charAt(i);while(k');if(f.test(d[q])&&!j.test(d[q])||l.test(d[q])||/180deg/.test(d[q])){var r=null;l.test(d[q])?r=l:/180deg/.test(d[q])?r=/180deg/:r=f,d[q]=d[q].replace(r,'')}else if(g.test(d[q])&&!k.test(d[q])||m.test(d[q])||/270deg/.test(d[q])){var r=null;m.test(d[q])?r=m:/270deg/.test(d[q])?r=/270deg/:r=g,d[q]=d[q].replace(r,'')}else if(h.test(d[q])&&!l.test(d[q])||j.test(d[q])||/[^\d]0deg/.test(d[q])){var r=null;j.test(d[q])?r=j:/0deg/.test(d[q])?r=/0deg/:r=h,d[q]=d[q].replace(r,'')}else if(i.test(d[q])&&!m.test(d[q])||k.test(d[q])||/90deg/.test(d[q])){var r=null;k.test(d[q])?r=k:/90deg/.test(d[q])?r=/90deg/:r=i,d[q]=d[q].replace(r,'')}else n.test(d[q])&&!o.test(d[q])?d[q]=d[q].replace(n,''):o.test(d[q])?d[q]=d[q].replace(o,''):c=!1}try{"".trim(),b=!0}catch(s){b=!1}b&&(d[q]=d[q].trim());if(/linear/.test(d[q])||/radial/.test(d[q])){d[q]=d[q].slice(0,-1),d[q]="url(data:image/svg+xml;base64--"+d[q]+')';var t=d.join("@@@"),u=t.match(/rgba?\(\d+,\s*\d+,\s*\d+,\s*(?:0|1|\.\d+|0\.\d+)\)\s*\d*%*/g)||0,v=t.match(/hsla?\(\d+,\s*\d+%,\s*\d+%,\s*(?:0|1|\.\d+|0\.\d+)\)\s*\d*%*/g)||0,w=[],x=[];for(var y=0;y').replace(/(rgba?\(\d+--\s*\d+--\s*\d+--\s*(0|1|\.\d+|0\.\d+)\))\s*(\d*.?\d*%)*/g,'').replace(/rgba/g,"rgb").replace(/(hsla?\(\d+--\s*\d+%--\s*\d+%--\s*(0|1|\.\d+|0\.\d+)\))\s*(\d*.?\d*%)*/g,'').replace(/hsla/g,"hsl").replace(/((?:aqua|black|blue|fuchsia|gray|grey|green|lime|maroon|navy|olive|purple|red|silver|teal|white|yellow))\s*(\d*%)*/g,'').replace(/\*\*\*/,"#grad-ucgg-generated");try{"".trim(),b=!0}catch(s){b=!1}b&&(C[E]=C[E].trim());if(/offset=""/g.test(C[E])){var F=C.length-2,G=Math.round(100/F)*D;console.log(G);var H='offset="'+G+'%"';C[E]=C[E].replace(/offset=""/,H),D++}}C=C.toString().replace(/,/g,"").replace(/--/g,",").replace(/(rgb?\(\d+,\s*\d+,\s*\d+),\s*(?:0|1|\.\d+|0\.\d+)\)/g,"$1)").replace(/(hsl?\(\d+,\s*\d+%,\s*\d+%),\s*(?:0|1|\.\d+|0\.\d+)\)/g,"$1)")}}/radial/.test(C)&&(/((ellipse).*(center)|(circle).*(center))/g.test(C)?C=C.replace(/<\/linearGradient>/g,"").replace(/radial-gradient[^<]+/g,'').replace(//g,''):C=!1);var I=null;try{C=C.split("@@@");var J=0;for(J;J/),I=K(I.join("")),C[J]=C[J].replace(/(<\?xml.*<\/svg>)/,I)}catch(s){}return c?C:C=!1,C?C.toString():C})()`; + @backgroundMoz: ~`(function(){var a,b,c,d,e,f,g,h,i,j,k;a="@{arguments}",c=null,d=a.split(/,(?=\s*(?:linear|radial))/g),e=d.length,k=/to\s*top/,j=/to\s*right/,h=/to\s*bottom/,i=/to\s*left/,b=/\d*deg/,f=0;while(f 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .background-origin(content-box); } + + +// .background-size + + .background-size(...){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + + @processing: ~`(function(){ var arg = "@{arguments}".replace("[","").replace("]","") || "none"; if( !/^\w*%?([ X])/.test(arg) ) { arg = arg.replace(/,/g,"") } return arg; })()`; + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-background-size: @processing;} + .inception (@signal, @arguments) when (@signal = 2) { -moz-background-size: @processing;} + .inception (@signal, @arguments) when (@signal = 5) { background-size: @processing;} + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .background-size(50% auto); } + + +// .border-radius + + .border-radius(@arguments:0) { + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-border-radius: @arguments; -webkit-background-clip: padding-box;} + .inception (@signal, @arguments) when (@signal = 2) { -moz-border-radius: @arguments; -moz-background-clip: padding;} + .inception (@signal, @arguments) when (@signal = 5) { border-radius: @arguments; background-clip: padding-box; } + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .border-radius(10px); } // all corner rounded + // element{ .border-radius(~"10px / 20px"); } // NEED TO BE ESCAPED OR LESS DEVIDE IT! Horizontal and vertical rounded differently + // element{ .border-radius(0 10px 0 0); } // only top right corner rounded + + +// .border-top-left-radius + + .border-top-left-radius(@arguments:0) { + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-border-top-left-radius: @arguments; -webkit-background-clip: padding-box;} + .inception (@signal, @arguments) when (@signal = 2) { -moz-border-radius-topleft: @arguments; -moz-background-clip: padding;} + .inception (@signal, @arguments) when (@signal = 5) { border-top-left-radius: @arguments; background-clip: padding-box; } + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .border-top-left-radius(10px); } + + +// .border-top-right-radius + + .border-top-right-radius(@arguments:0) { + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-border-top-right-radius: @arguments; -webkit-background-clip: padding-box;} + .inception (@signal, @arguments) when (@signal = 2) { -moz-border-radius-topright: @arguments; -moz-background-clip: padding;} + .inception (@signal, @arguments) when (@signal = 5) { border-top-right-radius: @arguments; background-clip: padding-box; } + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .border-top-right-radius(10px); } + + +// .border-bottom-left-radius + + .border-bottom-left-radius(@arguments:0) { + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-border-bottom-left-radius: @arguments; -webkit-background-clip: padding-box;} + .inception (@signal, @arguments) when (@signal = 2) { -moz-border-radius-bottomleft: @arguments; -moz-background-clip: padding;} + .inception (@signal, @arguments) when (@signal = 5) { border-bottom-left-radius: @arguments; background-clip: padding-box; } + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .border-bottom-left-radius(10px); } + + +// .border-bottom-right-radius + + .border-bottom-right-radius(@arguments:0) { + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-border-bottom-right-radius: @arguments; -webkit-background-clip: padding-box;} + .inception (@signal, @arguments) when (@signal = 2) { -moz-border-radius-bottomright: @arguments; -moz-background-clip: padding;} + .inception (@signal, @arguments) when (@signal = 5) { border-bottom-right-radius: @arguments; background-clip: padding-box; } + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .border-bottom-right-radius(10px); } + + +// .border-image + + .border-image(@arguments:none){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + @operaLocal: true; // Opera 10.5+ + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-border-image: @arguments;} + .inception (@signal, @arguments) when (@signal = 2) { -moz-border-image: @arguments;} + .inception (@signal, @arguments) when (@signal = 3) { -o-border-image: @arguments;} + .inception (@signal, @arguments) when (@signal = 5) { border-image: @arguments; } + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @operaSignal, @opera, @operaLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .border-image(url(border.png) 30 30 round); } + + +// .box-shadow + + .box-shadow(...){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + + @processing: ~`(function(){ var arg = "@{arguments}".replace("[","").replace("]","") || "none"; if( !/^#?\w*%?([ X])/.test(arg) ) { arg = arg.replace(/,(?=[^()]*\))/g,'--').replace(/,/g,"").replace(/--/g,','); } return arg; })()`; + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-box-shadow: @processing;} + .inception (@signal, @arguments) when (@signal = 2) { -moz-box-shadow: @processing;} + .inception (@signal, @arguments) when (@signal = 5) { box-shadow: @processing;} + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + + color: @arguments; + } + + // element{ .box-shadow(0 1px 10px rgba(20,20,20,0.5), 0 1px 10px rgba(20,20,20,0.5)); } + + +// .box-sizing + + .box-sizing(@arguments:content-box){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-box-sizing: @arguments;} + .inception (@signal, @arguments) when (@signal = 2) { -moz-box-sizing: @arguments;} + .inception (@signal, @arguments) when (@signal = 5) { box-sizing: @arguments;} + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .box-sizing(border-box); } + + +// .columns + + .columns(@arguments:auto auto){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-columns: @arguments;} + .inception (@signal, @arguments) when (@signal = 2) { -moz-columns: @arguments;} + .inception (@signal, @arguments) when (@signal = 5) { columns: @arguments;} + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .columns(100px 3); } + + +// .column-count + + .column-count(@arguments:auto){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-column-count: @arguments;} + .inception (@signal, @arguments) when (@signal = 2) { -moz-column-count: @arguments;} + .inception (@signal, @arguments) when (@signal = 5) { column-count: @arguments;} + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .column-count(3); } + + +// .column-gap + + .column-gap(@arguments:normal){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-column-gap: @arguments;} + .inception (@signal, @arguments) when (@signal = 2) { -moz-column-gap: @arguments;} + .inception (@signal, @arguments) when (@signal = 5) { column-gap: @arguments;} + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .column-gap(40px); } + + +// .column-rule + + .column-rule(@arguments:medium none black){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-column-rule: @arguments;} + .inception (@signal, @arguments) when (@signal = 2) { -moz-column-rule: @arguments;} + .inception (@signal, @arguments) when (@signal = 5) { column-rule: @arguments;} + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .column-rule(3px outset #ff00ff); } + + +// .column-width + + .column-width(@arguments:auto){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-column-width: @arguments;} + .inception (@signal, @arguments) when (@signal = 2) { -moz-column-width: @arguments;} + .inception (@signal, @arguments) when (@signal = 5) { column-width: @arguments;} + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .column-width(100px); } + + +// .font-face + + .font-face(@fontname, @fontfile) { + + font-family: "@{fontname}"; + src: url("@{fontfile}-webfont.eot"); + src: url("@{fontfile}-webfont.eot?#iefix") format("embedded-opentype"), + url("@{fontfile}-webfont.woff") format("woff"), + url("@{fontfile}-webfont.ttf") format("truetype"), + url("@{fontfile}-webfont.svg#@{fontname}") format("svg"); + font-weight: normal; + font-style: normal; + } + + // element{ .font-face(ZendaRegular, zenda-webfont); } + + +// .opacity + + .opacity(@arguments:1){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-opacity: @arguments;} + .inception (@signal, @arguments) when (@signal = 2) { -moz-opacity: @arguments;} + .inception (@signal, @arguments) when (@signal = 5) { opacity: @arguments;} + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .opacity(.5); } + + +// .perspective + + .perspective(@arguments:none){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-perspective: @arguments;} + .inception (@signal, @arguments) when (@signal = 2) { -moz-perspective: @arguments;} + .inception (@signal, @arguments) when (@signal = 5) { perspective: @arguments;} + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .perspective(350px); } + + +// .perspective-origin + + .perspective-origin(@arguments:50% 50%){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-perspective-origin: @arguments;} + .inception (@signal, @arguments) when (@signal = 2) { -moz-perspective-origin: @arguments;} + .inception (@signal, @arguments) when (@signal = 5) { perspective-origin: @arguments;} + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .perspective-origin(top left); } + + +// .size + + .size(@square){ + width: @square; + height: @square; + } + + .size(@width, @height){ + width: @width; + height: @height; + } + + // element{ .size(10px); } // render width:10px; height:10px; + // element{ .size(10px, 20px); } // render width:10px; height: 20px; + + +// .transform + + .transform(@arguments:none, ...){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + @operaLocal: true; // Opera 10.5+ + @msLocal: true; // IE 10+ + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-transform: @arguments;} + .inception (@signal, @arguments) when (@signal = 2) { -moz-transform: @arguments;} + .inception (@signal, @arguments) when (@signal = 3) { -o-transform: @arguments;} + .inception (@signal, @arguments) when (@signal = 4) { -ms-transform: @arguments;} + .inception (@signal, @arguments) when (@signal = 5) { transform: @arguments;} + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @operaSignal, @opera, @operaLocal); + // -- + .result(@arguments, @msSignal, @ms, @msLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .transform(scale(.5) translate(10px, 20px)); } + + +// .transform-origin + + .transform-origin(@arguments:50% 50% 0){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + @operaLocal: true; // Opera 10.5+ + @msLocal: true; // IE 10+ + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-transform-origin: @arguments;} + .inception (@signal, @arguments) when (@signal = 2) { -moz-transform-origin: @arguments;} + .inception (@signal, @arguments) when (@signal = 3) { -o-transform-origin: @arguments;} + .inception (@signal, @arguments) when (@signal = 4) { -ms-transform-origin: @arguments;} + .inception (@signal, @arguments) when (@signal = 5) { transform-origin: @arguments;} + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @operaSignal, @opera, @operaLocal); + // -- + .result(@arguments, @msSignal, @ms, @msLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .transform-origin(20% 40%); } + + +// .transform-style + + .transform-style(@arguments:flat){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + @msLocal: true; // IE 10+ + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-transform-origin: @arguments;} + .inception (@signal, @arguments) when (@signal = 2) { -moz-transform-origin: @arguments;} + .inception (@signal, @arguments) when (@signal = 4) { -ms-transform-origin: @arguments;} + .inception (@signal, @arguments) when (@signal = 5) { transform-origin: @arguments;} + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @msSignal, @ms, @msLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .transform-style(preserve-3d); } + + +// .translate + + .translate(@x:0, @y:0){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + @operaLocal: true; // Opera 10.5+ + @msLocal: true; // IE 10+ + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-transform: translate(@x, @y);} + .inception (@signal, @arguments) when (@signal = 2) { -moz-transform: translate(@x, @y);} + .inception (@signal, @arguments) when (@signal = 3) { -o-transform: translate(@x, @y);} + .inception (@signal, @arguments) when (@signal = 4) { -ms-transform: translate(@x, @y);} + .inception (@signal, @arguments) when (@signal = 5) { transform: translate(@x, @y);} + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @operaSignal, @opera, @operaLocal); + // -- + .result(@arguments, @msSignal, @ms, @msLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .translate(100px); } + // element{ .translate(100px, 50px); } + + +// .translate3d + + .translate3d(@x:0, @y:0, @z:0){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + @operaLocal: true; // Opera 10.5+ + @msLocal: true; // IE 10+ + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-transform: translate3d(@x, @y, @z);} + .inception (@signal, @arguments) when (@signal = 2) { -moz-transform: translate3d(@x, @y, @z);} + .inception (@signal, @arguments) when (@signal = 3) { -o-transform: translate3d(@x, @y, @z);} + .inception (@signal, @arguments) when (@signal = 4) { -ms-transform: translate3d(@x, @y, @z);} + .inception (@signal, @arguments) when (@signal = 5) { transform: translate3d(@x, @y, @z);} + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @operaSignal, @opera, @operaLocal); + // -- + .result(@arguments, @msSignal, @ms, @msLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .translate3d(10px, 20px, 30px); } + + +// .translateX + + .translateX(@x:0){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + @operaLocal: true; // Opera 10.5+ + @msLocal: true; // IE 10+ + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-transform: translateX(@x);} + .inception (@signal, @arguments) when (@signal = 2) { -moz-transform: translateX(@x);} + .inception (@signal, @arguments) when (@signal = 3) { -o-transform: translateX(@x);} + .inception (@signal, @arguments) when (@signal = 4) { -ms-transform: translateX(@x);} + .inception (@signal, @arguments) when (@signal = 5) { transform: translateX(@x);} + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @operaSignal, @opera, @operaLocal); + // -- + .result(@arguments, @msSignal, @ms, @msLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .translateX(10px); } + + +// .translateY + + .translateY(@y:0){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + @operaLocal: true; // Opera 10.5+ + @msLocal: true; // IE 10+ + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-transform: translateY(@y);} + .inception (@signal, @arguments) when (@signal = 2) { -moz-transform: translateY(@y);} + .inception (@signal, @arguments) when (@signal = 3) { -o-transform: translateY(@y);} + .inception (@signal, @arguments) when (@signal = 4) { -ms-transform: translateY(@y);} + .inception (@signal, @arguments) when (@signal = 5) { transform: translateY(@y);} + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @operaSignal, @opera, @operaLocal); + // -- + .result(@arguments, @msSignal, @ms, @msLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .translateY(15px); } + + +// .translateZ + + .translateZ(@z:0){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + @operaLocal: true; // Opera 10.5+ + @msLocal: true; // IE 10+ + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-transform: translateZ(@z);} + .inception (@signal, @arguments) when (@signal = 2) { -moz-transform: translateZ(@z);} + .inception (@signal, @arguments) when (@signal = 3) { -o-transform: translateZ(@z);} + .inception (@signal, @arguments) when (@signal = 4) { -ms-transform: translateZ(@z);} + .inception (@signal, @arguments) when (@signal = 5) { transform: translateZ(@z);} + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @operaSignal, @opera, @operaLocal); + // -- + .result(@arguments, @msSignal, @ms, @msLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .translateZ(32px); } + + +// .scale + + .scale(@x:1){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + @operaLocal: true; // Opera 10.5+ + @msLocal: true; // IE 10+ + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-transform: scale(@x);} + .inception (@signal, @arguments) when (@signal = 2) { -moz-transform: scale(@x);} + .inception (@signal, @arguments) when (@signal = 3) { -o-transform: scale(@x);} + .inception (@signal, @arguments) when (@signal = 4) { -ms-transform: scale(@x);} + .inception (@signal, @arguments) when (@signal = 5) { transform: scale(@x);} + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @operaSignal, @opera, @operaLocal); + // -- + .result(@arguments, @msSignal, @ms, @msLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + .scale(@x, @y){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + @operaLocal: true; // Opera 10.5+ + @msLocal: true; // IE 10+ + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-transform: scale(@x, @y);} + .inception (@signal, @arguments) when (@signal = 2) { -moz-transform: scale(@x, @y);} + .inception (@signal, @arguments) when (@signal = 3) { -o-transform: scale(@x, @y);} + .inception (@signal, @arguments) when (@signal = 4) { -ms-transform: scale(@x, @y);} + .inception (@signal, @arguments) when (@signal = 5) { transform: scale(@x, @y);} + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @operaSignal, @opera, @operaLocal); + // -- + .result(@arguments, @msSignal, @ms, @msLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .scale(2); } + // element{ .scale(2, 1); } + + +// .scale3d + + .scale3d(@x:1, @y:1, @z:1){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + @operaLocal: true; // Opera 10.5+ + @msLocal: true; // IE 10+ + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-transform: scale3d(@x, @y, @z);} + .inception (@signal, @arguments) when (@signal = 2) { -moz-transform: scale3d(@x, @y, @z);} + .inception (@signal, @arguments) when (@signal = 3) { -o-transform: scale3d(@x, @y, @z);} + .inception (@signal, @arguments) when (@signal = 4) { -ms-transform: scale3d(@x, @y, @z);} + .inception (@signal, @arguments) when (@signal = 5) { transform: scale3d(@x, @y, @z);} + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @operaSignal, @opera, @operaLocal); + // -- + .result(@arguments, @msSignal, @ms, @msLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .scale3d(1, 2, 1); } + + +// .scaleX + + .scaleX(@x:1){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + @operaLocal: true; // Opera 10.5+ + @msLocal: true; // IE 10+ + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-transform: scaleX(@x);} + .inception (@signal, @arguments) when (@signal = 2) { -moz-transform: scaleX(@x);} + .inception (@signal, @arguments) when (@signal = 3) { -o-transform: scaleX(@x);} + .inception (@signal, @arguments) when (@signal = 4) { -ms-transform: scaleX(@x);} + .inception (@signal, @arguments) when (@signal = 5) { transform: scaleX(@x);} + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @operaSignal, @opera, @operaLocal); + // -- + .result(@arguments, @msSignal, @ms, @msLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .scaleX(1.5); } + + +// .scaleY + + .scaleY(@y:1){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + @operaLocal: true; // Opera 10.5+ + @msLocal: true; // IE 10+ + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-transform: scaleX(@y);} + .inception (@signal, @arguments) when (@signal = 2) { -moz-transform: scaleX(@y);} + .inception (@signal, @arguments) when (@signal = 3) { -o-transform: scaleX(@y);} + .inception (@signal, @arguments) when (@signal = 4) { -ms-transform: scaleX(@y);} + .inception (@signal, @arguments) when (@signal = 5) { transform: scaleX(@y);} + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @operaSignal, @opera, @operaLocal); + // -- + .result(@arguments, @msSignal, @ms, @msLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .scaleX(1.5); } + + +// .scaleZ + + .scaleZ(@z:1){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + @operaLocal: true; // Opera 10.5+ + @msLocal: true; // IE 10+ + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-transform: scaleZ(@z);} + .inception (@signal, @arguments) when (@signal = 2) { -moz-transform: scaleZ(@z);} + .inception (@signal, @arguments) when (@signal = 3) { -o-transform: scaleZ(@z);} + .inception (@signal, @arguments) when (@signal = 4) { -ms-transform: scaleZ(@z);} + .inception (@signal, @arguments) when (@signal = 5) { transform: scaleZ(@z);} + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @operaSignal, @opera, @operaLocal); + // -- + .result(@arguments, @msSignal, @ms, @msLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .scaleZ(2.7); } + + +// .rotate + + .rotate(@angle:0){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + @operaLocal: true; // Opera 10.5+ + @msLocal: true; // IE 10+ + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-transform: rotate(@angle);} + .inception (@signal, @arguments) when (@signal = 2) { -moz-transform: rotate(@angle);} + .inception (@signal, @arguments) when (@signal = 3) { -o-transform: rotate(@angle);} + .inception (@signal, @arguments) when (@signal = 4) { -ms-transform: rotate(@angle);} + .inception (@signal, @arguments) when (@signal = 5) { transform: rotate(@angle);} + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @operaSignal, @opera, @operaLocal); + // -- + .result(@arguments, @msSignal, @ms, @msLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .rotate(45deg); } + + +// .rotate3d + + .rotate3d(@x:0, @y:0, @z: 0, @angle:0){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + @operaLocal: true; // Opera 10.5+ + @msLocal: true; // IE 10+ + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-transform: rotate3d(@x, @y, @z, @angle);} + .inception (@signal, @arguments) when (@signal = 2) { -moz-transform: rotate3d(@x, @y, @z, @angle);} + .inception (@signal, @arguments) when (@signal = 3) { -o-transform: rotate3d(@x, @y, @z, @angle);} + .inception (@signal, @arguments) when (@signal = 4) { -ms-transform: rotate3d(@x, @y, @z, @angle);} + .inception (@signal, @arguments) when (@signal = 5) { transform: rotate3d(@x, @y, @z, @angle);} + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @operaSignal, @opera, @operaLocal); + // -- + .result(@arguments, @msSignal, @ms, @msLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .rotate3d(1, 2.0, 3.0, 10deg); } + + +// .rotateX + + .rotateX(@angle:0){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + @operaLocal: true; // Opera 10.5+ + @msLocal: true; // IE 10+ + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-transform: rotateX(@angle);} + .inception (@signal, @arguments) when (@signal = 2) { -moz-transform: rotateX(@angle);} + .inception (@signal, @arguments) when (@signal = 3) { -o-transform: rotateX(@angle);} + .inception (@signal, @arguments) when (@signal = 4) { -ms-transform: rotateX(@angle);} + .inception (@signal, @arguments) when (@signal = 5) { transform: rotateX(@angle);} + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @operaSignal, @opera, @operaLocal); + // -- + .result(@arguments, @msSignal, @ms, @msLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .rotateX(63deg); } + + +// .rotateY + + .rotateY(@angle:0){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + @operaLocal: true; // Opera 10.5+ + @msLocal: true; // IE 10+ + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-transform: rotateY(@angle);} + .inception (@signal, @arguments) when (@signal = 2) { -moz-transform: rotateY(@angle);} + .inception (@signal, @arguments) when (@signal = 3) { -o-transform: rotateY(@angle);} + .inception (@signal, @arguments) when (@signal = 4) { -ms-transform: rotateY(@angle);} + .inception (@signal, @arguments) when (@signal = 5) { transform: rotateY(@angle);} + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @operaSignal, @opera, @operaLocal); + // -- + .result(@arguments, @msSignal, @ms, @msLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .rotateY(24deg); } + + +// .rotateZ + + .rotateZ(@angle:0){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + @operaLocal: true; // Opera 10.5+ + @msLocal: true; // IE 10+ + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-transform: rotateZ(@angle);} + .inception (@signal, @arguments) when (@signal = 2) { -moz-transform: rotateZ(@angle);} + .inception (@signal, @arguments) when (@signal = 3) { -o-transform: rotateZ(@angle);} + .inception (@signal, @arguments) when (@signal = 4) { -ms-transform: rotateZ(@angle);} + .inception (@signal, @arguments) when (@signal = 5) { transform: rotateZ(@angle);} + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @operaSignal, @opera, @operaLocal); + // -- + .result(@arguments, @msSignal, @ms, @msLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .rotateZ(280deg); } + + +// .skew + + .skew(@angle:0){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + @operaLocal: true; // Opera 10.5+ + @msLocal: true; // IE 10+ + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-transform: skew(@angle);} + .inception (@signal, @arguments) when (@signal = 2) { -moz-transform: skew(@angle);} + .inception (@signal, @arguments) when (@signal = 3) { -o-transform: skew(@angle);} + .inception (@signal, @arguments) when (@signal = 4) { -ms-transform: skew(@angle);} + .inception (@signal, @arguments) when (@signal = 5) { transform: skew(@angle);} + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @operaSignal, @opera, @operaLocal); + // -- + .result(@arguments, @msSignal, @ms, @msLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .skew(20deg); } + + +// .skewX + + .skewX(@angle:0){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + @operaLocal: true; // Opera 10.5+ + @msLocal: true; // IE 10+ + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-transform: skewX(@angle);} + .inception (@signal, @arguments) when (@signal = 2) { -moz-transform: skewX(@angle);} + .inception (@signal, @arguments) when (@signal = 3) { -o-transform: skewX(@angle);} + .inception (@signal, @arguments) when (@signal = 4) { -ms-transform: skewX(@angle);} + .inception (@signal, @arguments) when (@signal = 5) { transform: skewX(@angle);} + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @operaSignal, @opera, @operaLocal); + // -- + .result(@arguments, @msSignal, @ms, @msLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .skewX(24deg); } + + +// .skewY + + .skewY(@angle:0){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + @operaLocal: true; // Opera 10.5+ + @msLocal: true; // IE 10+ + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-transform: skewY(@angle);} + .inception (@signal, @arguments) when (@signal = 2) { -moz-transform: skewY(@angle);} + .inception (@signal, @arguments) when (@signal = 3) { -o-transform: skewY(@angle);} + .inception (@signal, @arguments) when (@signal = 4) { -ms-transform: skewY(@angle);} + .inception (@signal, @arguments) when (@signal = 5) { transform: skewY(@angle);} + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @operaSignal, @opera, @operaLocal); + // -- + .result(@arguments, @msSignal, @ms, @msLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .skewY(36deg); } + + +// .transition + + .transition(...){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + @operaLocal: true; // Opera 10.5+ + @msLocal: true; // IE 10+ + + @transitionWebkit: ~`(function(){var a,b,c,d,e,f,g;a="@{arguments}".split(","),c=["background-size","border-","box-shadow","column","transform"],d=c.length,e=a,f=!1,b=a.length;for(var h=0;h 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @operaSignal, @opera, @operaLocal); + // -- + .result(@arguments, @msSignal, @ms, @msLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .transition(transform 3s linear); } + + +// .transition-property + + .transition-property(...){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + @operaLocal: true; // Opera 10.5+ + @msLocal: true; // IE 10+ + + @transitionWebkit: ~`(function(){var a,b,c,d,e,f,g;a="@{arguments}".split(","),c=["background-size","border-","box-shadow","column","transform"],d=c.length,e=a,f=!1,b=a.length;for(var h=0;h 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @operaSignal, @opera, @operaLocal); + // -- + .result(@arguments, @msSignal, @ms, @msLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .transition-property(width, height); } + + +// .transition-duration + + .transition-duration(...){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + @operaLocal: true; // Opera 10.5+ + @msLocal: true; // IE 10+ + + @processing: ~`(function(){ var arg = "@{arguments}" || "0"; try{ var hasComma = arg.match(/,/g).length > 1 ? true : false; } catch (e) {} if (hasComma === true) arg = arg.replace(/,/g,""); arg = arg.replace("[","").replace("]",""); return arg; }())`; + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-transition-duration: @processing; } + .inception (@signal, @arguments) when (@signal = 2) { -moz-transition-duration: @processing; } + .inception (@signal, @arguments) when (@signal = 3) { -o-transition-duration: @processing; } + .inception (@signal, @arguments) when (@signal = 5) { transition-duration: @processing; } + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @operaSignal, @opera, @operaLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .transition-duration(250ms); } + + +// .transition-timing-function + + .transition-timing-function(...){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + @operaLocal: true; // Opera 10.5+ + @msLocal: true; // IE 10+ + + @processing: ~`(function(){ var arg = "@{arguments}" || "ease"; arg = arg.replace("[","").replace("]",""); return arg; }())`; + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-transition-timing-function: @processing; } + .inception (@signal, @arguments) when (@signal = 2) { -moz-transition-timing-function: @processing; } + .inception (@signal, @arguments) when (@signal = 3) { -o-transition-timing-function: @processing; } + .inception (@signal, @arguments) when (@signal = 5) { transition-timing-function: @processing; } + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @operaSignal, @opera, @operaLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .transition-timing-function(cubic-bezier(0,0,1,1)); } + + +// .transition-delay + + .transition-delay(...){ + + // Local config for disabling properties + + @w3cLocal: true; // Unprefixed W3C syntax + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + @operaLocal: true; // Opera 10.5+ + @msLocal: true; // IE 10+ + + @processing: ~`(function(){ var arg = "@{arguments}" || "0"; arg = arg.replace("[","").replace("]",""); return arg; }())`; + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-transition-delay: @processing; } + .inception (@signal, @arguments) when (@signal = 2) { -moz-transition-delay: @processing; } + .inception (@signal, @arguments) when (@signal = 3) { -o-transition-delay: @processing; } + .inception (@signal, @arguments) when (@signal = 5) { transition-delay: @processing; } + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @operaSignal, @opera, @operaLocal); + // -- + .result(@arguments, @w3cSignal, @w3c, @w3cLocal); + } + + // element{ .transition-delay(2s); } + + +// .user-select + + .user-select(@arguments:auto){ + + // Local config for disabling properties + + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @mozLocal: true; // Firefox 4+ + @msLocal: true; // IE 10+ + + .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { + .inception (@signal, @arguments) when (@signal = 1) { -webkit-user-select: @arguments; } + .inception (@signal, @arguments) when (@signal = 2) { -moz-user-select: @arguments; } + .inception (@signal, @arguments) when (@signal = 4) { -ms-user-select: @arguments; } + .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } + .inception(@signal, @arguments); + } + .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } + + .result(@arguments, @webkitSignal, @webkit, @webkitLocal); + // -- this comment must be here because of LESS bug + .result(@arguments, @mozSignal, @moz, @mozLocal); + // -- + .result(@arguments, @msSignal, @ms, @msLocal); + } + + // element{ .user-select(text); } + + +// DEPRECATED mixins (must be supported because of old version of CSS Hat) + + // .gradient (renamed background-image) + + .gradient(...){ + + // Local config for disabling properties + + @svg: true; // SVG gradient for IE9 + @mozLocal: true; // Firefox 4+ + @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android + @operaLocal: true; // Opera 10.5+ + @w3cLocal: true; // Unprefixed W3C syntax + + @backgroundSVG: ~`(function(){function G(a){var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",c,d,e,f,g,h,i,j,k=0,l=0,m="",n=[];if(!a)return a;do c=a.charCodeAt(k++),d=a.charCodeAt(k++),e=a.charCodeAt(k++),j=c<<16|d<<8|e,f=j>>18&63,g=j>>12&63,h=j>>6&63,i=j&63,n[l++]=b.charAt(f)+b.charAt(g)+b.charAt(h)+b.charAt(i);while(k');if(f.test(d[q])&&!j.test(d[q])||l.test(d[q])||/180deg/.test(d[q])){var r=null;l.test(d[q])?r=l:/180deg/.test(d[q])?r=/180deg/:r=f,d[q]=d[q].replace(r,'')}else if(g.test(d[q])&&!k.test(d[q])||m.test(d[q])||/270deg/.test(d[q])){var r=null;m.test(d[q])?r=m:/270deg/.test(d[q])?r=/270deg/:r=g,d[q]=d[q].replace(r,'')}else if(h.test(d[q])&&!l.test(d[q])||j.test(d[q])||/[^\d]0deg/.test(d[q])){var r=null;j.test(d[q])?r=j:/0deg/.test(d[q])?r=/0deg/:r=h,d[q]=d[q].replace(r,'')}else if(i.test(d[q])&&!m.test(d[q])||k.test(d[q])||/90deg/.test(d[q])){var r=null;k.test(d[q])?r=k:/90deg/.test(d[q])?r=/90deg/:r=i,d[q]=d[q].replace(r,'')}else n.test(d[q])&&!o.test(d[q])?d[q]=d[q].replace(n,''):o.test(d[q])?d[q]=d[q].replace(o,''):c=!1}try{"".trim(),b=!0}catch(s){b=!1}b&&(d[q]=d[q].trim());if(/linear/.test(d[q])||/radial/.test(d[q])){d[q]=d[q].slice(0,-1),d[q]="url(data:image/svg+xml;base64--"+d[q]+')';var t=d.join("@@@"),u=t.match(/rgba?\(\d+,\s*\d+,\s*\d+,\s*(?:0|1|\.\d+|0\.\d+)\)\s*\d*%*/g)||0,v=t.match(/hsla?\(\d+,\s*\d+%,\s*\d+%,\s*(?:0|1|\.\d+|0\.\d+)\)\s*\d*%*/g)||0,w=[],x=[];for(var y=0;y').replace(/(rgba?\(\d+--\s*\d+--\s*\d+--\s*(0|1|\.\d+|0\.\d+)\))\s*(\d*%)*/g,'').replace(/rgba/g,"rgb").replace(/(hsla?\(\d+--\s*\d+%--\s*\d+%--\s*(0|1|\.\d+|0\.\d+)\))\s*(\d*%)*/g,'').replace(/hsla/g,"hsl").replace(/((?:aqua|black|blue|fuchsia|gray|grey|green|lime|maroon|navy|olive|purple|red|silver|teal|white|yellow))\s*(\d*%)*/g,'').replace(/\*\*\*/,"#grad-ucgg-generated");try{"".trim(),b=!0}catch(s){b=!1}b&&(C[D]=C[D].trim())}C=C.toString().replace(/,/g,"").replace(/--/g,",").replace(/(rgb?\(\d+,\s*\d+,\s*\d+),\s*(?:0|1|\.\d+|0\.\d+)\)/g,"$1)").replace(/(hsl?\(\d+,\s*\d+%,\s*\d+%),\s*(?:0|1|\.\d+|0\.\d+)\)/g,"$1)")}}/radial/.test(C)&&(/((ellipse).*(center)|(circle).*(center))/g.test(C)?C=C.replace(/<\/linearGradient>/g,"").replace(/radial-gradient[^<]+/g,'').replace(//g,''):C=!1);var E=null;try{C=C.split("@@@");var F=0;for(F;F/),E=G(E.join("")),C[F]=C[F].replace(/(<\?xml.*<\/svg>)/,E)}catch(s){}return c?C:C=!1,C?C.toString().replace(/\[/g,"").replace(/\]/g,""):C}())`; + @backgroundMoz: ~`(function(){var a,b,c,d,e,f,g,h,i,j,k;a="@{arguments}",c=null,d=a.split(/,(?=\s*(?:linear|radial))/g),e=d.length,k=/to\s*top/,j=/to\s*right/,h=/to\s*bottom/,i=/to\s*left/,b=/\d*deg/,f=0;while(f li { position: relative; } +} +.@{fa-css-prefix}-li { + position: absolute; + left: -@fa-li-width; + width: @fa-li-width; + top: (2em / 14); + text-align: center; + &.@{fa-css-prefix}-lg { + left: -@fa-li-width + (4em / 14); + } +} diff --git a/app/assets/stylesheets/fontawesome/mixins.less b/app/assets/stylesheets/fontawesome/mixins.less new file mode 100644 index 0000000..19e5a64 --- /dev/null +++ b/app/assets/stylesheets/fontawesome/mixins.less @@ -0,0 +1,20 @@ +// Mixins +// -------------------------- + +.fa-icon-rotate(@degrees, @rotation) { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation); + -webkit-transform: rotate(@degrees); + -moz-transform: rotate(@degrees); + -ms-transform: rotate(@degrees); + -o-transform: rotate(@degrees); + transform: rotate(@degrees); +} + +.fa-icon-flip(@horiz, @vert, @rotation) { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation, mirror=1); + -webkit-transform: scale(@horiz, @vert); + -moz-transform: scale(@horiz, @vert); + -ms-transform: scale(@horiz, @vert); + -o-transform: scale(@horiz, @vert); + transform: scale(@horiz, @vert); +} diff --git a/app/assets/stylesheets/fontawesome/path.less b/app/assets/stylesheets/fontawesome/path.less new file mode 100644 index 0000000..c1b1dfe --- /dev/null +++ b/app/assets/stylesheets/fontawesome/path.less @@ -0,0 +1,14 @@ +/* FONT PATH + * -------------------------- */ + +@font-face { + font-family: 'FontAwesome'; + src: url('/fonts/fontawesome-webfont.eot?v=@{fa-version}'); + src: url('/fonts/fontawesome-webfont.eot?#iefix&v=@{fa-version}') format('embedded-opentype'), + url('/fonts/fontawesome-webfont.woff?v=@{fa-version}') format('woff'), + url('/fonts/fontawesome-webfont.ttf?v=@{fa-version}') format('truetype'), + url('/fonts/fontawesome-webfont.svg?v=@{fa-version}#fontawesomeregular') format('svg'); +// src: url('@{fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts + font-weight: normal; + font-style: normal; +} diff --git a/app/assets/stylesheets/fontawesome/rotated-flipped.less b/app/assets/stylesheets/fontawesome/rotated-flipped.less new file mode 100644 index 0000000..8fff3a6 --- /dev/null +++ b/app/assets/stylesheets/fontawesome/rotated-flipped.less @@ -0,0 +1,9 @@ +// Rotated & Flipped Icons +// ------------------------- + +.@{fa-css-prefix}-rotate-90 { .fa-icon-rotate(90deg, 1); } +.@{fa-css-prefix}-rotate-180 { .fa-icon-rotate(180deg, 2); } +.@{fa-css-prefix}-rotate-270 { .fa-icon-rotate(270deg, 3); } + +.@{fa-css-prefix}-flip-horizontal { .fa-icon-flip(-1, 1, 0); } +.@{fa-css-prefix}-flip-vertical { .fa-icon-flip(1, -1, 2); } diff --git a/app/assets/stylesheets/fontawesome/spinning.less b/app/assets/stylesheets/fontawesome/spinning.less new file mode 100644 index 0000000..60828fe --- /dev/null +++ b/app/assets/stylesheets/fontawesome/spinning.less @@ -0,0 +1,30 @@ +// Spinning Icons +// -------------------------- + +.@{fa-css-prefix}-spin { + -webkit-animation: spin 2s infinite linear; + -moz-animation: spin 2s infinite linear; + -o-animation: spin 2s infinite linear; + animation: spin 2s infinite linear; +} + +@-moz-keyframes spin { + 0% { -moz-transform: rotate(0deg); } + 100% { -moz-transform: rotate(359deg); } +} +@-webkit-keyframes spin { + 0% { -webkit-transform: rotate(0deg); } + 100% { -webkit-transform: rotate(359deg); } +} +@-o-keyframes spin { + 0% { -o-transform: rotate(0deg); } + 100% { -o-transform: rotate(359deg); } +} +@-ms-keyframes spin { + 0% { -ms-transform: rotate(0deg); } + 100% { -ms-transform: rotate(359deg); } +} +@keyframes spin { + 0% { transform: rotate(0deg); } + 100% { transform: rotate(359deg); } +} diff --git a/app/assets/stylesheets/fontawesome/stacked.less b/app/assets/stylesheets/fontawesome/stacked.less new file mode 100644 index 0000000..fc53fb0 --- /dev/null +++ b/app/assets/stylesheets/fontawesome/stacked.less @@ -0,0 +1,20 @@ +// Stacked Icons +// ------------------------- + +.@{fa-css-prefix}-stack { + position: relative; + display: inline-block; + width: 2em; + height: 2em; + line-height: 2em; + vertical-align: middle; +} +.@{fa-css-prefix}-stack-1x, .@{fa-css-prefix}-stack-2x { + position: absolute; + left: 0; + width: 100%; + text-align: center; +} +.@{fa-css-prefix}-stack-1x { line-height: inherit; } +.@{fa-css-prefix}-stack-2x { font-size: 2em; } +.@{fa-css-prefix}-inverse { color: @fa-inverse; } diff --git a/app/assets/stylesheets/fontawesome/variables.less b/app/assets/stylesheets/fontawesome/variables.less new file mode 100644 index 0000000..f40a555 --- /dev/null +++ b/app/assets/stylesheets/fontawesome/variables.less @@ -0,0 +1,381 @@ +// Variables +// -------------------------- + +@fa-font-path: "../fonts"; +//@fa-font-path: "//netdna.bootstrapcdn.com/font-awesome/4.0.3/fonts"; // for referencing Bootstrap CDN font files directly +@fa-css-prefix: fa; +@fa-version: "4.0.3"; +@fa-border-color: #eee; +@fa-inverse: #fff; +@fa-li-width: (30em / 14); + +@fa-var-glass: "\f000"; +@fa-var-music: "\f001"; +@fa-var-search: "\f002"; +@fa-var-envelope-o: "\f003"; +@fa-var-heart: "\f004"; +@fa-var-star: "\f005"; +@fa-var-star-o: "\f006"; +@fa-var-user: "\f007"; +@fa-var-film: "\f008"; +@fa-var-th-large: "\f009"; +@fa-var-th: "\f00a"; +@fa-var-th-list: "\f00b"; +@fa-var-check: "\f00c"; +@fa-var-times: "\f00d"; +@fa-var-search-plus: "\f00e"; +@fa-var-search-minus: "\f010"; +@fa-var-power-off: "\f011"; +@fa-var-signal: "\f012"; +@fa-var-cog: "\f013"; +@fa-var-trash-o: "\f014"; +@fa-var-home: "\f015"; +@fa-var-file-o: "\f016"; +@fa-var-clock-o: "\f017"; +@fa-var-road: "\f018"; +@fa-var-download: "\f019"; +@fa-var-arrow-circle-o-down: "\f01a"; +@fa-var-arrow-circle-o-up: "\f01b"; +@fa-var-inbox: "\f01c"; +@fa-var-play-circle-o: "\f01d"; +@fa-var-repeat: "\f01e"; +@fa-var-refresh: "\f021"; +@fa-var-list-alt: "\f022"; +@fa-var-lock: "\f023"; +@fa-var-flag: "\f024"; +@fa-var-headphones: "\f025"; +@fa-var-volume-off: "\f026"; +@fa-var-volume-down: "\f027"; +@fa-var-volume-up: "\f028"; +@fa-var-qrcode: "\f029"; +@fa-var-barcode: "\f02a"; +@fa-var-tag: "\f02b"; +@fa-var-tags: "\f02c"; +@fa-var-book: "\f02d"; +@fa-var-bookmark: "\f02e"; +@fa-var-print: "\f02f"; +@fa-var-camera: "\f030"; +@fa-var-font: "\f031"; +@fa-var-bold: "\f032"; +@fa-var-italic: "\f033"; +@fa-var-text-height: "\f034"; +@fa-var-text-width: "\f035"; +@fa-var-align-left: "\f036"; +@fa-var-align-center: "\f037"; +@fa-var-align-right: "\f038"; +@fa-var-align-justify: "\f039"; +@fa-var-list: "\f03a"; +@fa-var-outdent: "\f03b"; +@fa-var-indent: "\f03c"; +@fa-var-video-camera: "\f03d"; +@fa-var-picture-o: "\f03e"; +@fa-var-pencil: "\f040"; +@fa-var-map-marker: "\f041"; +@fa-var-adjust: "\f042"; +@fa-var-tint: "\f043"; +@fa-var-pencil-square-o: "\f044"; +@fa-var-share-square-o: "\f045"; +@fa-var-check-square-o: "\f046"; +@fa-var-arrows: "\f047"; +@fa-var-step-backward: "\f048"; +@fa-var-fast-backward: "\f049"; +@fa-var-backward: "\f04a"; +@fa-var-play: "\f04b"; +@fa-var-pause: "\f04c"; +@fa-var-stop: "\f04d"; +@fa-var-forward: "\f04e"; +@fa-var-fast-forward: "\f050"; +@fa-var-step-forward: "\f051"; +@fa-var-eject: "\f052"; +@fa-var-chevron-left: "\f053"; +@fa-var-chevron-right: "\f054"; +@fa-var-plus-circle: "\f055"; +@fa-var-minus-circle: "\f056"; +@fa-var-times-circle: "\f057"; +@fa-var-check-circle: "\f058"; +@fa-var-question-circle: "\f059"; +@fa-var-info-circle: "\f05a"; +@fa-var-crosshairs: "\f05b"; +@fa-var-times-circle-o: "\f05c"; +@fa-var-check-circle-o: "\f05d"; +@fa-var-ban: "\f05e"; +@fa-var-arrow-left: "\f060"; +@fa-var-arrow-right: "\f061"; +@fa-var-arrow-up: "\f062"; +@fa-var-arrow-down: "\f063"; +@fa-var-share: "\f064"; +@fa-var-expand: "\f065"; +@fa-var-compress: "\f066"; +@fa-var-plus: "\f067"; +@fa-var-minus: "\f068"; +@fa-var-asterisk: "\f069"; +@fa-var-exclamation-circle: "\f06a"; +@fa-var-gift: "\f06b"; +@fa-var-leaf: "\f06c"; +@fa-var-fire: "\f06d"; +@fa-var-eye: "\f06e"; +@fa-var-eye-slash: "\f070"; +@fa-var-exclamation-triangle: "\f071"; +@fa-var-plane: "\f072"; +@fa-var-calendar: "\f073"; +@fa-var-random: "\f074"; +@fa-var-comment: "\f075"; +@fa-var-magnet: "\f076"; +@fa-var-chevron-up: "\f077"; +@fa-var-chevron-down: "\f078"; +@fa-var-retweet: "\f079"; +@fa-var-shopping-cart: "\f07a"; +@fa-var-folder: "\f07b"; +@fa-var-folder-open: "\f07c"; +@fa-var-arrows-v: "\f07d"; +@fa-var-arrows-h: "\f07e"; +@fa-var-bar-chart-o: "\f080"; +@fa-var-twitter-square: "\f081"; +@fa-var-facebook-square: "\f082"; +@fa-var-camera-retro: "\f083"; +@fa-var-key: "\f084"; +@fa-var-cogs: "\f085"; +@fa-var-comments: "\f086"; +@fa-var-thumbs-o-up: "\f087"; +@fa-var-thumbs-o-down: "\f088"; +@fa-var-star-half: "\f089"; +@fa-var-heart-o: "\f08a"; +@fa-var-sign-out: "\f08b"; +@fa-var-linkedin-square: "\f08c"; +@fa-var-thumb-tack: "\f08d"; +@fa-var-external-link: "\f08e"; +@fa-var-sign-in: "\f090"; +@fa-var-trophy: "\f091"; +@fa-var-github-square: "\f092"; +@fa-var-upload: "\f093"; +@fa-var-lemon-o: "\f094"; +@fa-var-phone: "\f095"; +@fa-var-square-o: "\f096"; +@fa-var-bookmark-o: "\f097"; +@fa-var-phone-square: "\f098"; +@fa-var-twitter: "\f099"; +@fa-var-facebook: "\f09a"; +@fa-var-github: "\f09b"; +@fa-var-unlock: "\f09c"; +@fa-var-credit-card: "\f09d"; +@fa-var-rss: "\f09e"; +@fa-var-hdd-o: "\f0a0"; +@fa-var-bullhorn: "\f0a1"; +@fa-var-bell: "\f0f3"; +@fa-var-certificate: "\f0a3"; +@fa-var-hand-o-right: "\f0a4"; +@fa-var-hand-o-left: "\f0a5"; +@fa-var-hand-o-up: "\f0a6"; +@fa-var-hand-o-down: "\f0a7"; +@fa-var-arrow-circle-left: "\f0a8"; +@fa-var-arrow-circle-right: "\f0a9"; +@fa-var-arrow-circle-up: "\f0aa"; +@fa-var-arrow-circle-down: "\f0ab"; +@fa-var-globe: "\f0ac"; +@fa-var-wrench: "\f0ad"; +@fa-var-tasks: "\f0ae"; +@fa-var-filter: "\f0b0"; +@fa-var-briefcase: "\f0b1"; +@fa-var-arrows-alt: "\f0b2"; +@fa-var-users: "\f0c0"; +@fa-var-link: "\f0c1"; +@fa-var-cloud: "\f0c2"; +@fa-var-flask: "\f0c3"; +@fa-var-scissors: "\f0c4"; +@fa-var-files-o: "\f0c5"; +@fa-var-paperclip: "\f0c6"; +@fa-var-floppy-o: "\f0c7"; +@fa-var-square: "\f0c8"; +@fa-var-bars: "\f0c9"; +@fa-var-list-ul: "\f0ca"; +@fa-var-list-ol: "\f0cb"; +@fa-var-strikethrough: "\f0cc"; +@fa-var-underline: "\f0cd"; +@fa-var-table: "\f0ce"; +@fa-var-magic: "\f0d0"; +@fa-var-truck: "\f0d1"; +@fa-var-pinterest: "\f0d2"; +@fa-var-pinterest-square: "\f0d3"; +@fa-var-google-plus-square: "\f0d4"; +@fa-var-google-plus: "\f0d5"; +@fa-var-money: "\f0d6"; +@fa-var-caret-down: "\f0d7"; +@fa-var-caret-up: "\f0d8"; +@fa-var-caret-left: "\f0d9"; +@fa-var-caret-right: "\f0da"; +@fa-var-columns: "\f0db"; +@fa-var-sort: "\f0dc"; +@fa-var-sort-asc: "\f0dd"; +@fa-var-sort-desc: "\f0de"; +@fa-var-envelope: "\f0e0"; +@fa-var-linkedin: "\f0e1"; +@fa-var-undo: "\f0e2"; +@fa-var-gavel: "\f0e3"; +@fa-var-tachometer: "\f0e4"; +@fa-var-comment-o: "\f0e5"; +@fa-var-comments-o: "\f0e6"; +@fa-var-bolt: "\f0e7"; +@fa-var-sitemap: "\f0e8"; +@fa-var-umbrella: "\f0e9"; +@fa-var-clipboard: "\f0ea"; +@fa-var-lightbulb-o: "\f0eb"; +@fa-var-exchange: "\f0ec"; +@fa-var-cloud-download: "\f0ed"; +@fa-var-cloud-upload: "\f0ee"; +@fa-var-user-md: "\f0f0"; +@fa-var-stethoscope: "\f0f1"; +@fa-var-suitcase: "\f0f2"; +@fa-var-bell-o: "\f0a2"; +@fa-var-coffee: "\f0f4"; +@fa-var-cutlery: "\f0f5"; +@fa-var-file-text-o: "\f0f6"; +@fa-var-building-o: "\f0f7"; +@fa-var-hospital-o: "\f0f8"; +@fa-var-ambulance: "\f0f9"; +@fa-var-medkit: "\f0fa"; +@fa-var-fighter-jet: "\f0fb"; +@fa-var-beer: "\f0fc"; +@fa-var-h-square: "\f0fd"; +@fa-var-plus-square: "\f0fe"; +@fa-var-angle-double-left: "\f100"; +@fa-var-angle-double-right: "\f101"; +@fa-var-angle-double-up: "\f102"; +@fa-var-angle-double-down: "\f103"; +@fa-var-angle-left: "\f104"; +@fa-var-angle-right: "\f105"; +@fa-var-angle-up: "\f106"; +@fa-var-angle-down: "\f107"; +@fa-var-desktop: "\f108"; +@fa-var-laptop: "\f109"; +@fa-var-tablet: "\f10a"; +@fa-var-mobile: "\f10b"; +@fa-var-circle-o: "\f10c"; +@fa-var-quote-left: "\f10d"; +@fa-var-quote-right: "\f10e"; +@fa-var-spinner: "\f110"; +@fa-var-circle: "\f111"; +@fa-var-reply: "\f112"; +@fa-var-github-alt: "\f113"; +@fa-var-folder-o: "\f114"; +@fa-var-folder-open-o: "\f115"; +@fa-var-smile-o: "\f118"; +@fa-var-frown-o: "\f119"; +@fa-var-meh-o: "\f11a"; +@fa-var-gamepad: "\f11b"; +@fa-var-keyboard-o: "\f11c"; +@fa-var-flag-o: "\f11d"; +@fa-var-flag-checkered: "\f11e"; +@fa-var-terminal: "\f120"; +@fa-var-code: "\f121"; +@fa-var-reply-all: "\f122"; +@fa-var-mail-reply-all: "\f122"; +@fa-var-star-half-o: "\f123"; +@fa-var-location-arrow: "\f124"; +@fa-var-crop: "\f125"; +@fa-var-code-fork: "\f126"; +@fa-var-chain-broken: "\f127"; +@fa-var-question: "\f128"; +@fa-var-info: "\f129"; +@fa-var-exclamation: "\f12a"; +@fa-var-superscript: "\f12b"; +@fa-var-subscript: "\f12c"; +@fa-var-eraser: "\f12d"; +@fa-var-puzzle-piece: "\f12e"; +@fa-var-microphone: "\f130"; +@fa-var-microphone-slash: "\f131"; +@fa-var-shield: "\f132"; +@fa-var-calendar-o: "\f133"; +@fa-var-fire-extinguisher: "\f134"; +@fa-var-rocket: "\f135"; +@fa-var-maxcdn: "\f136"; +@fa-var-chevron-circle-left: "\f137"; +@fa-var-chevron-circle-right: "\f138"; +@fa-var-chevron-circle-up: "\f139"; +@fa-var-chevron-circle-down: "\f13a"; +@fa-var-html5: "\f13b"; +@fa-var-css3: "\f13c"; +@fa-var-anchor: "\f13d"; +@fa-var-unlock-alt: "\f13e"; +@fa-var-bullseye: "\f140"; +@fa-var-ellipsis-h: "\f141"; +@fa-var-ellipsis-v: "\f142"; +@fa-var-rss-square: "\f143"; +@fa-var-play-circle: "\f144"; +@fa-var-ticket: "\f145"; +@fa-var-minus-square: "\f146"; +@fa-var-minus-square-o: "\f147"; +@fa-var-level-up: "\f148"; +@fa-var-level-down: "\f149"; +@fa-var-check-square: "\f14a"; +@fa-var-pencil-square: "\f14b"; +@fa-var-external-link-square: "\f14c"; +@fa-var-share-square: "\f14d"; +@fa-var-compass: "\f14e"; +@fa-var-caret-square-o-down: "\f150"; +@fa-var-caret-square-o-up: "\f151"; +@fa-var-caret-square-o-right: "\f152"; +@fa-var-eur: "\f153"; +@fa-var-gbp: "\f154"; +@fa-var-usd: "\f155"; +@fa-var-inr: "\f156"; +@fa-var-jpy: "\f157"; +@fa-var-rub: "\f158"; +@fa-var-krw: "\f159"; +@fa-var-btc: "\f15a"; +@fa-var-file: "\f15b"; +@fa-var-file-text: "\f15c"; +@fa-var-sort-alpha-asc: "\f15d"; +@fa-var-sort-alpha-desc: "\f15e"; +@fa-var-sort-amount-asc: "\f160"; +@fa-var-sort-amount-desc: "\f161"; +@fa-var-sort-numeric-asc: "\f162"; +@fa-var-sort-numeric-desc: "\f163"; +@fa-var-thumbs-up: "\f164"; +@fa-var-thumbs-down: "\f165"; +@fa-var-youtube-square: "\f166"; +@fa-var-youtube: "\f167"; +@fa-var-xing: "\f168"; +@fa-var-xing-square: "\f169"; +@fa-var-youtube-play: "\f16a"; +@fa-var-dropbox: "\f16b"; +@fa-var-stack-overflow: "\f16c"; +@fa-var-instagram: "\f16d"; +@fa-var-flickr: "\f16e"; +@fa-var-adn: "\f170"; +@fa-var-bitbucket: "\f171"; +@fa-var-bitbucket-square: "\f172"; +@fa-var-tumblr: "\f173"; +@fa-var-tumblr-square: "\f174"; +@fa-var-long-arrow-down: "\f175"; +@fa-var-long-arrow-up: "\f176"; +@fa-var-long-arrow-left: "\f177"; +@fa-var-long-arrow-right: "\f178"; +@fa-var-apple: "\f179"; +@fa-var-windows: "\f17a"; +@fa-var-android: "\f17b"; +@fa-var-linux: "\f17c"; +@fa-var-dribbble: "\f17d"; +@fa-var-skype: "\f17e"; +@fa-var-foursquare: "\f180"; +@fa-var-trello: "\f181"; +@fa-var-female: "\f182"; +@fa-var-male: "\f183"; +@fa-var-gittip: "\f184"; +@fa-var-sun-o: "\f185"; +@fa-var-moon-o: "\f186"; +@fa-var-archive: "\f187"; +@fa-var-bug: "\f188"; +@fa-var-vk: "\f189"; +@fa-var-weibo: "\f18a"; +@fa-var-renren: "\f18b"; +@fa-var-pagelines: "\f18c"; +@fa-var-stack-exchange: "\f18d"; +@fa-var-arrow-circle-o-right: "\f18e"; +@fa-var-arrow-circle-o-left: "\f190"; +@fa-var-caret-square-o-left: "\f191"; +@fa-var-dot-circle-o: "\f192"; +@fa-var-wheelchair: "\f193"; +@fa-var-vimeo-square: "\f194"; +@fa-var-try: "\f195"; +@fa-var-plus-square-o: "\f196"; + diff --git a/app/assets/stylesheets/forum.css.scss b/app/assets/stylesheets/forum.css.scss deleted file mode 100644 index 05b5ead..0000000 --- a/app/assets/stylesheets/forum.css.scss +++ /dev/null @@ -1,271 +0,0 @@ - -@import "compass"; -@import "compass/reset"; - -@import "vendor/formtastic"; - -//$baseFontSize : 16px; - - -@import "compass"; - -//@import "admin/general"; -//@import "admin/forms"; - - - -body{ - -.button{ -background:#2e2e2e; -color:#fbfbfb; -padding:10px 15px; -display:inline-block; -border-radius:20px; - - - -} -#main{ -padding:0 1em; -} - - -table{ -@include border-radius(5px); -border:1px solid #9d9d9f; -.vertical_center{ -td{ -vertical-align:middle;} - -} - width:100%; - th{ - background:#2e2e2e; - color:#fbfbfb; - padding:5px; - border:0px; - } - td{ - border-bottom:1px solid #9d9d9f; - padding:5px; - - } - -} - -h1{ -margin-top:10px; -} - - nav#top{ - padding:0px; - height:42px; - position:relative; - color:#FFFFFF; - background: #2E2E2E; - - *{ - color:#FFFFFF; - } - - - a{ - display:inline-block; - padding:13px; - } - - - .personnal{ - width:160px; - float:right; - position:relative; - - span{ - display:inline-block; - top:-15px; - position:relative; - } - - .avatar{ - width:36px; - border-radius:50%; - margin:2px; - } - - .menu{ - display:none; - } - - &:hover{ - - .menu{ - display:block; - position:absolute; - z-index:1000; - top:40px; - background:#2E2E2E; - - a{ - display:block; - width:160px; - padding:10px 15px; - } - } - } - - } - - } - - .message{ - min-height:150px; - border:1px solid black; - margin:1em 1em 0 1em; - - } - - .right{float:right;} - - -} - - -.forum_message{ - @include border-radius(5px); - @include box-shadow(0px 0px 5px rgba(0,0,0,0.5) inset); - position:relative; - margin-bottom:1em; - min-height:120px; - - .left{ - @include box-shadow(0px 0px 5px rgba(0,0,0,0.5)); - @include border-radius(3px 0px 0px 3px); - position:absolute; - top:0px; - left:0px; - bottom:0px; - width:100px; - background:rgba(0,0,0,0.8); - text-align:center; - padding:10px; - - color:rgba(255,255,255,0.9); - - *{ - text-align:center; - } - - .avatar{ - width:70px; - height:70px; - @include border-radius(50%); - margin:auto; - } - - } - - .right{ - min-height:150px; - margin-left:120px; - padding:10px 2%; - line-height:1.1em; - float:none; - - img{ - max-width:100%; - max-height:90%; - - } - - - .large{ - max-width:100%; - margin-left:0px; - - - } - - .links{ - float:right; - - } - } - - - - - - -} - - -.message_form{ - - .form{ - width:60%; - - float:left; - .ace_editor{ - height:400px; - width:57%; - border:solid 1px #C9C9C9; - - - .ace_scroller{ - - - background:transparent !important; - } - - - - - } - } - - - .user_images{ - width:40%; - float:left; - .progress{ - - float:right; - width:250px; - - .bar{ - text-align:right; - } - } - - input[type=file]{ - display:none; - - } - .images{ - height:400px; - overflow:auto; - border:1px solid black; - - .user_image_block{ - padding:5px; - float:left; - width:120px; - border:1px solid black; - min-height:140px; - text-align:center; - margin:5px; - .user_image{ - cursor:pointer; - display:block; - margin:auto; - max-width:120px; - max-height:120px; - - - } - } - } - - } - } diff --git a/app/assets/stylesheets/forum.less b/app/assets/stylesheets/forum.less new file mode 100644 index 0000000..80908a7 --- /dev/null +++ b/app/assets/stylesheets/forum.less @@ -0,0 +1,282 @@ +@import "./vendor/framework/variables.less"; +@import "./vendor/framework/bootstrap.less"; +@import "fontawesome/font-awesome"; + +@import "./redactor"; + +#main{ +min-height:600px; + +} + +.footer{ +background:rgba(244,243,239,1); +padding:2em; +} +.transparent{ +td, th{ +background-color:transparent !important;} +} +#main{ +padding:0 1em; +} +.icon{ +border:1px solid #0088cc; +display:inline-block; +padding:6px; +border-radius:50%; +font-size:1.1em; +width:1.1em; +height:1.1em; +text-align:center; +background:white; + +&:hover{ +background:#0088cc; +color:white; +text-decoration:none; +} + + +} + + +.container-fluid{ +max-width:1100px; +margin:auto; + +} + +h1{ +margin-top:10px; +} + + + +.message{ +min-height:150px; +border:1px solid black; +margin:1em 1em 0 1em; + +} + +.right{float:right;} + + + + + +.forum_message{ + border-radius: 0 2em 0 2em ; + border:1px solid rgba(244,243,239,1); + position:relative; + margin-bottom:1em; + min-height:120px; + + .left{ + + border-radius :0px 0px 0px 2em ; + position:absolute; + top:0px; + left:0px; + bottom:0px; + width:150px; + background:rgba(244,243,239,1); + text-align:center; + padding:10px; + + + + *{ + text-align:center; + } + + .avatar{ + width:90px; + border-radius:60%; + + margin:auto; + margin-bottom:1em; + } + + } + + .right{ + min-height:150px; + margin-left:170px; + padding:10px 2%; + line-height:1.1em; + float:none; + position:relative; + + img{ + max-width:100%; + max-height:90%; + display:block; + margin:1em auto; + + + } + + + .large{ + max-width:100%; + margin-left:0px; + + + } + + .links{ + position:absolute; + top:-1.2em; + right:1em; + + } + } + + + + + + +} + +.user_images{ + width:430px; + box-shadow:0 0 5px rgba(0,0,0,0.5); + position:fixed; + bottom:2em; + right:-450px; + top:100px; + background:white; + padding:0; + padding-left:20px; + + h3, a{ + color:black; + } + + .toggle-button{ + font-size:25px; + color:white; + background:rgba(24,24,24,0.9); + width:25px; + height:25px; + text-align:center; + padding:10px; + position:absolute; + top:0px; + left:-45px; + .c{ + display:none; + } + } + + + &:hover{ + right:0px; + .o{ + display:none; + } + .c{ + display:block; + } + } + + .progress{ + + float:right; + width:250px; + + .bar{ + text-align:right; + } + } + +input[type=file]{ + display:none; + +} + .images{ + height:400px; + overflow:auto; + + + .user_image_block{ + padding:5px; + float:left; + width:120px; + + min-height:140px; + text-align:center; + margin:5px; + .user_image{ + cursor:pointer; + display:block; + margin:auto; + max-width:120px; + max-height:120px; + + + } + } + } + +} + +.redactor_box{ +border:0px !important; +background:transparent !important; +} +.message_form{ + + .form{ + width:60%; + + float:left; + .ace_editor{ + height:400px; + width:57%; + border:solid 1px #C9C9C9; + + + .ace_scroller{ + + + background:transparent !important; + } + + + + + } + } + + + + } +#toolbar-text{ + +background: linear-gradient(to bottom, #f1f1f1 0%, #e2e2e2 100%); +z-index:10; +position:fixed; +top:40px; +left:0px; +right:0px; + +.redactor_toolbar{ +border:0px; +margin:5px 0 !important; +background:transparent !important; +} +} + + +.fix-submit{ +z-index:10; +position:fixed; +top:40px; +margin-top:5px; +right:1em; + +} \ No newline at end of file diff --git a/app/assets/stylesheets/gaspillage.css.less b/app/assets/stylesheets/gaspillage.css.less new file mode 100644 index 0000000..0a291b9 --- /dev/null +++ b/app/assets/stylesheets/gaspillage.css.less @@ -0,0 +1,567 @@ + +@import "./vendor/framework/variables2.less"; +@import "./vendor/framework/bootstrap.less"; +@import "./vendor/fontawesome/font-awesome"; + +.page{ +position:absolute; +top:0; +left:0; +bottom:0px; +right:0px; + +} + + +@media only screen and (min-width: 1050px) { +.page{ +position:relative; +top:0; +left:0; +bottom:0px; +right:0px; +margin:auto; +height:1024px; +width:768px; + +} +} + +.pane_hover{ + +position:absolute; +z-index:2000; +top:0; +left:0; +right:0; +bottom:0; +background:rgba(250,250,250,0.95); +text-align:center; +img{ +max-width:90%; +margin-top:30px; +max-height:600px; + +} + +h3{ +font-size:1.8em; + +} + +p{ +font-size:1.5em; +text-align:center !important; +} +} + + + +.prev_slide,.next_slide{ + +color:white; +font-size:30px; +padding:10px 20px; +background:rgba(0,0,0,0.9); +position:absolute; +bottom:10px; +cursor:pointer; +text-align:right; + + +} + +.next_slide{ + +border-radius:30px 0px 0px 0px; +bottom:0px; +right:0px; + +} + +.prev_slide{ +border-radius:0px 30px 0px 0px; +text-align:left; +bottom:0px; +left:0px; + +} + + +.places_jeu, .places_jeu2{ +position:relative; + +.success{ +color:green; +text-align:center; +display:none; + +} + .img{ + position:relative; + + .receptable{ + position:absolute; + width:40px; + height:40px; + border-radius:50%; + background:rgb(230, 230, 230); + box-shadow:inset 0 1px 0 rgba(255,255,255,.2), 0 1px 5px rgba(0,0,0,.5); + border:2px solid rgba(82,82,82,1); + text-align:center; + + img{ + max-width:140px; + max-height:140px; + position:relative; + box-shadow:0 1px 5px rgba(0,0,0,.5); + box-sizing:border-box; + border:4px solid white; + top:-100%; + left:-100%; + + + + + + } + + } + + } + .vignettes{ + position:absolute; + right:1em; + width:450px; + top:1em; + height:100px; + + img{ + height:93px; + } + } + + +} +.jPuzzle-time{ +display:none !important; + +} +#results +{ + + text-align: center; + + + + margin-top:3em; + color:green; +} + +p, h2 +{ + text-align: justify; +} + + +.content{ + +padding:1em; + +} + +.quizz{ +.quizz_answer{ +margin:1em 0; + +} +label{ + + +} +input[type="radio"] { + position:absolute; + opacity: 0; + -moz-opacity: 0; + -webkit-opacity: 0; + -o-opacity: 0; +} +input[type="radio"] + label { + position:relative; + padding: 0 0 0 25px; + font-size: 20px; + line-height: 20px; +} +input[type="radio"] + label:before { + content:""; + display:block; + position:absolute; + top:2px; + height: 20px; + width: 20px; + background: white; + border: 1px solid gray; + box-shadow: inset 0px 0px 0px 2px white; + -webkit-box-shadow: inset 0px 0px 0px 2px white; + -moz-box-shadow: inset 0px 0px 0px 2px white; + -o-box-shadow: inset 0px 0px 0px 2px white; + + border-radius: 50%; +} +input[type="radio"]:checked + label:before { + background: rgba(74,129,233,1); +} + + +.question { +p{ +text-align:left; +} +*{ +font-size:1.2em !important; +} + +h3{ +font-size:1.7em !important; +line-height:1.3em; +margin-bottom:0.7em; +} +} +.check_place{ +text-align:center; +position:absolute; +bottom:1em; +left:0px; +right:0px; +} +border: 1px solid white; +min-height:890px; +padding:1em; +padding-right:2em; +position:relative; +margin:auto; + +.quizz_ill{ + position:absolute;top:20px;max-width:470px;right:-530px;background: rgba(250,250,250,0.8); + padding:10px; + img{ + max-height:500px; + } +} + + +.quizz_img{ + position:absolute;top:20px;max-width:470px;right:-530px;background: rgba(250,250,250,0.8); + padding:10px; + img{ + max-height:500px; + } +} + + +.prev{ +background:rgba(52,52,52,1) !important; +color:white !important; +position:absolute; +bottom:1em; +left:1em; +height:50px; +font-size:35px !important; +padding-top:10px; +border-radius:50%; +text-align:center; +width:50px; +box-sizing:border-box; +} + +.next{ +background:rgba(52,52,52,1) !important; +color:white !important; +height:50px; +font-size:35px !important; +padding-top:10px; + +text-align:center; +width:50px; +box-sizing:border-box; +position:absolute; +bottom:1em; +right:1em; + +border-radius:50%; +} + +.info{ +display:none; +color:red; + +} + +.response{ + +.info{ +color:green; +} +} + +.success, .fail{ +position:absolute; +bottom:4em; +text-align:center; +left:1em; +right:1em; +} +.success{ +color:green; + +} + +.fail{ +color:red; +} + +} + +.page{ + + + + + + +box-shadow:0 0 5px rgba(0,0,0,0.5); +background:white; + + + + +} +label{ +display:inline; +} +#overlay{ +cursor:pointer; + +} +.navbar{ + +.pull-right{ +margin-right:5px; +} +a{ +color:white !important; +&:hover{ +text-decoration:none !important; +} +} +} +#logos{ +margin:30px; +margin-top:10px; +border-radius:5px; + + +} +.nav-stacked { +margin:30px; +a{ +background:white; + +} + +} + .header{ + padding:10px; + + a{ + display:inline-block; + padding:5px; + text-decoration:none; + } + } + + + + #main{ + font-size:130%; + .btn{ + font-family:"Comic sans ms" + } + + .content{ + + } + + margin:auto; + a{ + color: #5890CD; + text-decoration:none; + + &:hover{ + text-decoration:underline; + } + } + table{ + border-collapse:collapse; + td{ + min-width:60px; + + + } + td, th{ + border: 1px solid #c9c9c9; + padding:5px; + text-align:left; + } + } + + } + body{ + font-family: "Helvetica", "Verdana"; + font-weight:100; + line-height:2.5em; + color:#303030; + padding:0px; + margin:0px; + font-size:12px; + + ul, li{ + line-height:1.5em; + } + +h3{ + + font-family:Futura; + font-size:18px;} + + h1{ + + font-family:"Architects Daughter"; + color:rgba(0,0,0,0.9); + font-size:27px; + font-weight:100; + + } + } + + #footer{ + + } + +#insectes_jeu_2{ + .labels{ + min-height:100px; + + .label{ + background:#555555; + display:inline-block; + margin-left:5px; + margin-bottom:5px; + padding:0.5em 1em; + color:white; + border-radius:1.2em; + + + + } + + } + .image{ + float:left; + width:300px; + height:200px; + padding:0em; + padding-bottom:2em !important; + + + img{ + max-width:100%; + max-height:100%; + } + position:relative; + text-align:center; + padding-bottom:1em; + + .receptable{ + border:1px solid black; + + .label{ + text-align:center; + position:absolute; + padding-bottom:0.5em; + bottom:0px; + left:0px; + right:0px; + } + + position:absolute; + top:0px; + bottom:0px; + left:0px; + right:0px; + + } + } + +} +#logos{ +text-align:center; +background:white; +padding:0.5em 0; +img{ +max-height:120px; +max-width:220px; +margin:0px 0.6em; +} + +} + + +.vie-arbre.story{ +td{ +padding:0.3em !important; +p{ +padding:0.7em !important; +border:1px solid black; +} +} + + +} + +a{ +color:#55a631 !important; +cursor:pointer; + +} +.animaux_sol{ +td{ +height:110px !important; +} +img{ +height:100% !important; + +} +} + + +.quizz .question{ + h3{ + a{ + font-size:inherit !important; + } + + }} + + + .places_jeu2{ + + .vignettes img{ + + height:130px !important; + margin-bottom:0.5em; + + } + } + + diff --git a/app/assets/stylesheets/plaquettes.css.less b/app/assets/stylesheets/plaquettes.css.less index 392d92a..31522d2 100644 --- a/app/assets/stylesheets/plaquettes.css.less +++ b/app/assets/stylesheets/plaquettes.css.less @@ -85,17 +85,18 @@ bottom:0px; left:0px; } - - -.places_jeu, .places_jeu2{ -position:relative; - .success{ color:green; text-align:center; display:none; + } + +.places_jeu, .places_jeu2{ +position:relative; + + .img{ position:relative; diff --git a/app/assets/stylesheets/redactor.less b/app/assets/stylesheets/redactor.less new file mode 100755 index 0000000..5392c33 --- /dev/null +++ b/app/assets/stylesheets/redactor.less @@ -0,0 +1,693 @@ +.redactor_box { + position: relative; + border: 1px solid #ddd; + overflow: visible; +} +.redactor_box, .redactor_box textarea { + background-color: #fff; +} + +body .redactor_air { + position: absolute; + border: 1px solid #ddd; + border-bottom: none; + z-index: 2; +} + +/* + Fullscreen +*/ +body .redactor_box_fullscreen { + left: 0; + position: fixed; + overflow: hidden; + top: 0; + width: 100%; + z-index: 2000; +} + +.redactor_box textarea { + font-family: Menlo, Monaco, monospace, sans-serif; + font-size: 13px; + overflow: auto; + resize: none; + margin: 0; + padding: 0; + display: block; + position: relative; + z-index: 1004; + outline: none; + border: none; + width: 100%; +} + + + +.redactor_editor, +.redactor_editor:focus, +.redactor_editor div, +.redactor_editor p, +.redactor_editor ul, +.redactor_editor ol, +.redactor_editor table, +.redactor_editor dl, +.redactor_editor blockquote, +.redactor_editor pre, +.redactor_editor h1, +.redactor_editor h2, +.redactor_editor h3, +.redactor_editor h4, +.redactor_editor h5 { + font-family: Arial, Helvetica, Verdana, Tahoma, sans-serif !important; +} + +.redactor_editor code, +.redactor_editor pre { + font-family: Menlo, Monaco, monospace, sans-serif !important; +} + +.redactor_editor, +.redactor_editor:focus, +.redactor_editor div, +.redactor_editor p, +.redactor_editor ul, +.redactor_editor ol, +.redactor_editor table, +.redactor_editor dl, +.redactor_editor blockquote, +.redactor_editor pre { + font-size: 15px !important; + line-height: 1.45em !important; +} + +.redactor_editor, .redactor_editor:focus { + position: relative; + outline: none; + box-shadow: none !important; + padding: 15px !important; + margin: 0 !important; + background: none; + background: #fff !important; + overflow: auto; + white-space: normal; +} +.redactor_editor a { + color: #15c !important; + text-decoration: underline !important; +} + +.redactor_editor object, +.redactor_editor embed, +.redactor_editor video, +.redactor_editor img { + width: auto; + max-width: 100%; +} +.redactor_editor video, +.redactor_editor img { + height: auto; +} + +.redactor_editor div, +.redactor_editor p, +.redactor_editor ul, +.redactor_editor ol, +.redactor_editor table, +.redactor_editor dl, +.redactor_editor blockquote, +.redactor_editor pre { + box-shadow: none !important; + background: none !important; + margin: 0 !important; + margin-bottom: 15px !important; + border: none; +} +.redactor_editor iframe, +.redactor_editor object, +.redactor_editor hr { + margin-bottom: 15px !important; +} +.redactor_editor blockquote { + margin-left: 3em !important; + font-style: italic !important; + color: #777; +} +.redactor_editor ul, +.redactor_editor ol { + padding-left: 2em !important; +} +.redactor_editor ul ul, +.redactor_editor ol ol, +.redactor_editor ul ol, +.redactor_editor ol ul { + border: none; + margin: 2px !important; + padding: 0 !important; + padding-left: 2em !important; +} +.redactor_editor dl dt { font-weight: bold; } +.redactor_editor dd { margin-left: 1em;} + +.redactor_editor table { + border-collapse: collapse; + font-size: 1em !important; +} +.redactor_editor table td { + border: 1px solid #ddd; + padding: 5px !important; + vertical-align: top; +} +.redactor_editor table thead td { + border-bottom: 2px solid #000 !important; + font-weight: bold !important; +} +.redactor_editor code { + background-color: #d8d7d7 !important; +} +.redactor_editor pre { + font-size: 90% !important; + background: #f8f8f8 !important; + border: 1px solid #ddd !important; + border-radius: 3px !important; + padding: 1em !important; + white-space: pre; + overflow: auto; +} +.redactor_editor hr { + display: block; + height: 1px; + border: 0; + border-top: 1px solid #ccc; +} + +.redactor_editor h1, +.redactor_editor h2, +.redactor_editor h3, +.redactor_editor h4, +.redactor_editor h5 { + color: #000; + background: none; + margin: 0 !important; + padding: 0 !important; + font-weight: bold; +} + +.redactor_editor h1 { + font-size: 36px !important; + line-height: 40px !important; + margin-bottom: 10px !important; +} +.redactor_editor h2 { + font-size: 30px !important; + line-height: 38px !important; + margin-bottom: 15px !important; +} +.redactor_editor h3 { + font-size: 24px !important; + line-height: 30px !important; + margin-bottom: 10px !important; +} +.redactor_editor h4 { + font-size: 18px !important; + line-height: 24px !important; + margin-bottom: 10px !important; +} +.redactor_editor h5 { + font-size: 1em !important; + margin-bottom: 10px !important; +} + +.redactor_editor.redactor_editor_wym { + background: #f6f6f6 !important; + padding: 5px 15px !important; +} +.redactor_editor_wym div, +.redactor_editor_wym p, +.redactor_editor_wym ul, +.redactor_editor_wym ol, +.redactor_editor_wym table, +.redactor_editor_wym dl, +.redactor_editor_wym pre, +.redactor_editor_wym h1, +.redactor_editor_wym h2, +.redactor_editor_wym h3, +.redactor_editor_wym h4, +.redactor_editor_wym h5, +.redactor_editor_wym blockquote { + background-color: #fff !important; + border: 1px solid #e4e4e4 !important; + padding: 10px !important; + margin: 10px 0 !important; +} +.redactor_editor_wym ul, +.redactor_editor_wym ol { + padding-left: 2em !important; +} + +/* + TOOLBAR +*/ +.redactor_toolbar { + font-family: Helvetica, Arial, Verdana, Tahoma, sans-serif !important; + position: relative; + left: 0; + top: 0; + margin: 0 !important; + padding: 0 !important; + padding-left: 2px !important; + line-height: 0 !important; + list-style: none !important; + font-size: 0; + background: #f1f1f1; + background: -moz-linear-gradient(top, #f1f1f1 0%, #e2e2e2 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f1f1f1), color-stop(100%,#e2e2e2)); + background: -webkit-linear-gradient(top, #f1f1f1 0%,#e2e2e2 100%); + background: -o-linear-gradient(top, #f1f1f1 0%,#e2e2e2 100%); + background: -ms-linear-gradient(top, #f1f1f1 0%,#e2e2e2 100%); + background: linear-gradient(to bottom, #f1f1f1 0%,#e2e2e2 100%); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f1f1f1', endColorstr='#e2e2e2',GradientType=0 ); + overflow: hidden !important; + height: 32px !important; + border-bottom: 1px solid #bbb; +} +body .redactor_air .redactor_toolbar { + padding-right: 2px !important; +} +.redactor_toolbar li { + float: left !important; + margin: 0 !important; + padding: 3px 1px; + padding-right: 0; + list-style: none !important; + outline: none; +} +.redactor_toolbar li.redactor_separator { + float: left; + height: 34px; + border-left: 1px solid #d3d3d3; + border-right: 1px solid #f1f1f1; + padding: 0; + margin: 0 2px 0 3px !important; +} +.redactor_toolbar li a { + width: 25px; + height: 25px; + border: 1px solid transparent; + //* border: 1px solid #eee; + display: block; + line-height: 0; + font-size: 0; + cursor: pointer; + zoom: 1; + outline: none; + text-decoration: none; +} +.redactor_toolbar li.redactor_btn_right { + float: none; + float: right !important; +} +.redactor_toolbar li a { + display: block; + text-indent: -9999px; + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAooAAAAZCAYAAAC2GQ9IAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAF4BJREFUeNrsXQlYFFe2LpoGgQZtVEARjYrigijuW9xIHNQxLsm4PWNERxhw17glE2OIz2U0xnFl1JeYoFGzqdHEMUHFLcaFuCBk3CKIyoAoNFtAoOn5T3sbO/0a6Oqqbsnk/t93v1q66p6qW/ec859zb1U76HQ6gYODg4ODg4ODg8MUDpwocnBwcHBwcHBwcKLIwcHBwcHBwcHBiSIHBwcHBwcHBwcnihwcHBwcHBwcHJwocnBwcHBwcHD8ZuEaERGxWaPRhIk5Sa1Wf7h169bpWC2y9wUr+TPj4OCoLJCMjo72ycnJaVNWVubl5OSU1qZNm0QYuV9403BwcPxOodiyZUubo0ePJn322Wee2NaIPL+hWJJIwDmTsViGcvv3ThSV06ZNG+js7OxIGyUlJdpNmzbFYbWM902OGgCXqKiolY8ePZplbQX16tVbFxMTswirxVUdl5ycrIyNje1QWFg4oKio6HkQNX/ogx+Rt/Lycnd2WLlCoSDSVlqrVq2fQeRuu7i4JKhUqrjhw4f/1LNnT62Ee3VctWpVjxs3bnwJeWqlUlkE+W4FBQVHGjduHDZ48OCHOEZXE9rqGcJ55syZczIyMlairbvMmTPnEj0TaytDe1s1vLNgwQIHrpocv3OoR48enWO600oiV6WMsLCwPiCJp2gHbVshw8fo+i5bcC7JDTY69zdDFJURERGhW7du/VYmEucaHh6+CU5otFarVZmyb5QMifV7TJgw4YfHjx8HmvvRy8vrbyCkS7D6WMa2rTN27Ng0ONnahh2enp7/QCQyV3gGqWMOWdBACvEhsPP/jpJalX4dOHBgUEpKygEQwXKQwGIET1q1Wl2KbRqCSAdxVKA4/vLLL846nU4B3QksLi4Oys/PH/3gwQPFsWPHhoG8HLZSP5XLli0bnJSUtMfPzy9zypQpR7y9vfMuXrzYCDo/NDExcTyI4maK5WpAWz1L1IW9eo1F+1OxoOstkFtIaGio8Nxzzwloe66BHLL6JFPAvuTt2bOnCVZzrZThNG/evMlpaWn/MOyA/UresWPHH+CDvzP44FGjRvmjpFQTbIrSxZUrV767aNGit032N0W5LJMMqkv46KOPThnvtIIs1jJa/5jsG+rYZ+5A1DuSyQ02c26NJorOiJxfd3Bw6Ij1H1CyJV6DIwxgaG5u7iSTBtqPxhuBVT85iCI66vJt27bNjIuL696mTZu06Ojo/bt37+68b9++3llZWQuXLFmSgX2bKDsjl1JC4d6AcqyFcjiDCH86cOBA6gwuVhDFimgJ7dIM6ymWnmhhB641ffr0v6IdFn366afehs4vs4xKoz6ZZdhSTgORkWBlUWGDashPbRhaGmJwwDnJIHy369SpU+Tm5kbErAzkUMB6KdNfyr47Qn9qgay4nTt3rtkXX3zRLj09PRr7z1ihn0rowZhr165tDQgIuAdCeBmGPgFBzu1evXoFw0iGgqg2x3Fu1RHFStrKJTY2tulrr71G919sZltsWz0rKEDmO7m6uuqdLsj5IHJWtiCKrVq1ElxcXPRk8c6dOzbJvNhABy2SJSHjY+v7sGc72QsNmzRpkgqCltS1a9f0DRs2DDp16lQ79K1S6OBG0uf58+cPYskZa4mi83vvvXfl7Nmz295///1w+NpU2JNVVCd88MqlS5fOX7x4MUU8CrJvMhJFBzMkUf8cZWw/s3WtXr16HdN9a5452cZU9JlJBiJqhFT2+zPXj6qIosO6desaJiYm/gVO4ige/vfYR0NZ9fPy8v4cEhKyg8hQVFTUMEQonlu2bNlUjeOoDO4pKSkRZvYbLtRdhgecj5LOOiZFTeRcb44bN67o8OHDPYqKihyhLD2wL1YG4mtA4d69e/2JJNarV68EJJGGpe4K1g2jGXeg/lacW11E5RYaGloARXbC+nOGdpJZhmBGEWwhw5ZyXEwiQTrODcZ1ETMYK7GobP5esFFU6FLNNfiADLaglQEDBpwk/cMqDfVSxtt16tSpH48ZM+ZtkLgk9qyUIJJuKPVBIF8goojzA7DfW2R/dnrrrbcm//zzz2u7det23c/Pr3Djxo1/xPqZwMDAtC+//HKFu7t74ciRIxMt6CPm2kpP/DIyMsIoMGcBoOm22LZSrFmzJiApKWkD7nkAAthSnU5H+l3u5eW1Gk5qOZyW68GDB1dkZ2eH4/cyFC2OcfDw8PgK97UIgW+qFQ6LSPmwyMjIeMgf8+jRI1/Ykk6DBg26J0gYfjZFhw4dnnbMpk3lIIr20kFLZVmb8bH1fdizneyFslWrVr3PSBr198F6Rw8IT4YzM2DD6LqljBISB3io1WofM19LHCML5d8o9UpLS4uYH8yWkSQSKbr1LBoUZPuYj4/PWQnE2pCV3F4JaWtWE/TcHFF0fOONN/rA8EVpNJrRcFJXnn/+ecocOlO2DQ0zAs6obPz48Vfo4KCgIA8Y4oUgXdF169bdjLITUcNPIoylOyLmAjgn0/13ZHyeRBRvFxcX68lnWVkZkbULa9eubU8kEUTucVhY2HmWnZEL5SDZrWmlXbt2KSy7c9NaJUSH+bvJerCF0Yol0L700kv3QRQNUVOuDWSIvXarZdhJDh17HqTts4cPH/ahHVjP27x58+gqyKKlqFNSUmIgSNRvjrI6SafaghA13blz56YzZ85Mg67tYX2K+q7KGcAyEn2dMn51xGQCFixYMC8tLW0JyOlFBE4OBw4c6Ari802fPn0y33nnnc9r166tnDdv3nZvb+9kMfeINmkKXXiOHBKIpjvshwbk+sUCwHQbBE7Xvn17MYGK+61bt7bQPM7WrVvfadKkySMEsm737t1TFxYW/gm6vRX1+yCYHQSilQ7yq3F1dS2GvfG5ffv2aJzrgTrGMBshBrXxjOq0aNHiLEp/2MvGP/7445/QXkfkzCo2aNBAACEV+vXrp88snjhxQnKd9tJBC2Rdrsn3Yc92shOIrH3LAs76sBH6BI3uyadP6LopmeEm0X7RSEcmVPnfzNeSrDSWqHGHTpIPviZjQkbvs/CsokG2lhh2xMTEpEdFRfnaukFnzJgRAtlRWM2R2JcryyjWCP0wJYpuERER22F0+3bs2PH8kCFD1sP4/os9ZHJS6uTk5L/07t37NHv4uXCOV1BWw2n5I2rvCcM7DRH6cpCwNRZmGEsHDx58/tixYy+j4zraQ1uuX7/uj05FUYDQqFGjgokTJ55s2LAhNVChjGLq3r17txetBAQEXGRtaG2kpsH1zmYPf0Bl0YcZ9Mfx6yzJfhKJxbFTWGRUIU9GGYaOT9mlEzQng5TDwnsRI6Oivdj8Dg2LOPfJLMeNkcQ/GnbQOu1jZFGYNGkSZcmE7du3h4l83k4gNnqyBHL2kD0fQ+BVV680paUe6Mex06dPf37jxo00N46Cn3zwriw989dqFSy4swS15s6d+7/379+fC6JzFrKVcXFxwdCLw506dfoRJG4tzVEcOXJkPEhqAo6/IYgYPUCbUOBI5JIy1uply5aFRUdH7zE8G5NtcjSBx48ft7T6htnZ2X38/f2zUUc86RmcUZ34+PgOGRkZ+StWrPizo6Ojc/fu3a+BRCpDQkIuY5uyGk3gSF5BMBwiPJkgLoYoOuKZ9rtz585Y9Kuxhp0gn0MoayIXUVSr1TT3keyVnijSNpFF2pYAMbotGOmQxkLHJWbIqz/KbCNZYoZsDbbkKxH6LUbHRbWTBFtlTxQa+TjPan6v6TB+85iybpcN09Ww/BrbV7F8JMg7BUBjQr7yUE4yvy5pFMEGGUVZ9dyUKHq2bNnSEdG/J5xGRzyEPDicm4GBgZQq1h44cKAbyJwvTUrF9j3WUDdg1P0uXbo0AI6yo0qlKu/SpQs5KJWFziTPx8fnfGxs7IfffvvtS7t27fIBUbXpW3zBwcHZb7755uE1a9b0RbTut3z58iEwwJeXLl36vVydmBxtfn6+2tXVtWzgwIFxEiMotYSUsiVzNDzQqc7RSnh4eHdcr6cNZAiGTghZlyS2gUXHMjLqKbLNLJXja0wSjckiosy9eqtbWBjKiJIbyONmMf3HsALSpgWxMR6icTTJOPkxo08RvA4RvN5gKRQKnXE9leHGjRuu27Zte4dI4rBhw05169YtBYRr3Ouvv/45dPlnLOeAhKUhcMxElD6ybdu2Py1cuJAyDmKGjchg32XX06CkpIRIbQYrptt0/Q1E1F2PEWrqW/tRbu3YsWMCAs++7PeKZ+Tg4KDLyckhZ0L2qz3OGZyXl6dmdYgZulKlpKS8sGnTplVeXl6UgWmMZzwEz95z9+7dIePGjaMpLFqpRsRACoks0pAzzVFE4C6VKIqds5UqyD/cXNW5l0XYEsOxwTZoA7Ud2tjqeWRWkOtKZcGnO+G3U1bWKwY6Z2fnfEHakLO5N49TDIQKSxrppJLI5GRbK6MS0mYIToz7oeTsqA0yirLquSlR1M6fP5+MbeYnn3zS5uTJk/1Onz49HM7hlcWLFycgSp/es2fPYyybSA2pmDt37uR79+4ta9as2dXx48ef6t+/P6WVz4lg2JSavkoPIDQ0NOuDDz5409ahCJsncRFO8AGuPxzXr7p79y6l4cmZ35dBhNv58+eJoQstWrTIYg8hX2JHsuXQc73IyMj3r127FgSi/gmI4hQbDT2bKqDaQjmXrVUS9kbaABvI8a7sh8zMzFBT8shIjMVQKpU69FOH7OzsWgik/j+z9/DQTZkyJQn6aGy0BDpezyZ/TS4rJaRXrlzpmJ6ePhUk8QT0958nTpzwBjmlQMc/OTl5aKdOna56e3uXov36NW/e/PrLL798UxA5RQMcuQ+Cz+eNhp4F2JkpRkPPFdtWDD070XxD3DdlK2n+Stqrr756HAFaL+xr7uvrm492VOCZqPz8/K6iP1xg+ugOAkZvjDuIyLzq22znzp0dUV8XkMR3maNoHgTAPjaHvZwHoviVHM6D5idSJtEYRBbpxRY4d6m2RPZpJVbUL1mWLe/JDvehroQgiHHuakuJooksz61bt448cuRIY+hf+UcAC+bE1muWENatW9esv8vPz28gUS3012/mzWMDWbxslBmzFpW9Qa0WbDS1wAYZRVl1wpQo5rBUahqcRnMUXziOOkVFRaqvv/6694MHD/qtXbt2CutQNESk7t27dw6i3JWBgYGGrEEK62iWprB1TO4FQd43lCoFm6NIk33qqdXq0UQUnZycyMF6yUQUPdFW3WmFnCsWDwRpE4RtPfRc0L1790sHDx4cuX37dnJ+ZTYaejadS0L3tVZmGabKEs0UcbbMcpxFXoq3iGPL6Q3n3Nxcl7y8PFcQRYVRhkqLbc3s2bOv+Pv7f4btU8LT+TEKOl4fqTx5Q7q6YM0JutARpFIBXafhmuNdunRpDGPeMiEhoTUIz3cIoHwPHTrUq0+fPokTJkzYCwJ2RxD5ZQAbDz1rQZ4e4Dr9pk2b9n8gfrdAotVarbYZiuucOXP2gNS5o/7/gU4GXLhwYWFhYSE5sfY5OTm1AwICxE4J8UR7fIN2U02aNOlv0Jceq1ev7ol66U1wISsrqy0C0PVr1qwJFyR8BouyiTQ3EURev03kMCIiQr8kAkm/SbUlVeiM2OFmU/Ji8ZCwRFnWyKxJQ8+GrKi19y2GEJnKavj48eMX9A5YpyM7QaM8SVbUazYX07Vr19sNGzbUpKam+u3YsaMTbEfqwoULZ8Lf0lQaKSOGVb15THZS6jcGFdBvXxBRW79BbeuMoqx6rjST3aNsIQ0B0VBMI0S0NLSSu3Tp0jlwIscYGcwyGOlXXnmFhmv/xSJoIlm5VpKiEsG+8yPKYMy73bx5sz5t9OjR46bEDlzR0b755pvg7OzsxrQRHBz8gyBxoqtg+6Hnx7NmzXoTBKFZVFTUwpiYmLk2kFFhrIw+faS2gQxjRdgvJRtZ3b2IjNjETBAv8fb21oAoNti/f//Q0tLSWyCA6SCIOSA+j5YvX/42yFCm8ORFl8wVK1YoiouLvRwcHJqCIL5EFdSvXz9XqH7qh7Jly5alCAKd9uzZ4zZ27NhbKpUqZ+jQoTtCQ0ObIygckZiY2Hn48OFnRowY8TWCqZMsayf26wbGQ8/euHbStXQWQJluix16zp48efIBOKOXb9261RPbPR8+fEhD0QU05QNk8Z8gt66wXa3i4+N7wzm2MMrYPcA9fyVSPz127dq1EEt6q5zmHnvOnz+fyPp7KG2EJ1NyDgnWfQarghQicKP+W7GPMog0/EwEkogiEUgrs4qW9O9UCZkTsUPCUmRZK7OmDD1rBPu9/GIqy1+j0ZQyomh4meW0TLKo3vvTp0/fu2HDhpEHDx6MpdK6deuD77777geC9Jf9fgW53jw2BIKm2Up7wAYZRVn1vLr/enZkmRN6e7Kt8GTe4RVGJo1/L2edQ+pnIfqjweINmSDKPFEGjTIdEuv1CAsLS2CfDPl1r/D0LOrbt2/G+PHjN2DzC+Fp+t0a1JoxY8bSzMzM+cY7IyMjg0JCQpIF6+dmkPGbyNap/TuIICgfW9AZ6LtZL1ImR3gyDYAce6jMMow7cH9GeDUW3otYGcFMRirrO01Z+0mVU9E/JUaP1fXp1t9//330+vXrR4P8lTs6OhZiWYSSr1QqH9MHuKG3RSA97lgqy8vLPbB0wdIVRUUf4J46deo+BHl/ZUFcpZwEdfRFYPB2QkJCBy8vr/WdO3f+0NnZucnp06dX5uTkBEFvvkPfPQzZp1i0XiRWl23cVjSXirL3dJyfIYBlffgH5vyc2O9dUWozu0W6SKMfdI0JFjoZi+eU4bpF/1GA4Z9ZZs6cqSeLhNjYWCEjI0M/BE3k0RjoH3qyKPKfWYKr0QWxulZTZMktM9hCm2GPe5IbHpMmTfqxsLCwpfHOoKCgPyxevPiYIMP8WqaXFLj1RnFl+njbKKtpbbbdrF2BvrViyS2pHIRGBugly7cMOwxvUMvERUx5zgDWHv0rySjq/ZfJ8cftrXvVEcUKAiQ8/dRGriDvP5hURYgMNyRV6XzZg+jLSFEBy144s6wqOVNSkOsS743aiD5ETm9SBrEMJWV99kvsxGqjTqRh25ZEDIaUcnXDCO7MyRrmpVD71JdZhun9qM2syyVDbXQvGqP2kyqnx7Zt27bHxcW1traDDBw48Fp4eDgNM5yt4jB6ueLFlJSUMVevXm12/fp196ysLBWIm3tJSQkNFztSAaGjf2rRqVSqYnd39yJE1fmtWrUqROR+r2nTpp+CVNKnMB5WIYcyfM1LS0sHHj58OOTQoUOd4DxcYBNq4VzHWbNmHQwODj7C+nCayEyivdpKwcgf6Xhdps+kZ/mMqD1ix9C0Eh8W7Dqwe6Hf/s36uyW6GWzpi1gw6B3F2i07/YVfdbpgjT7XBFlyy7TUZtjjnuSGL/NR/ZndL2Q6dpj5wBIZZCiYP2zESKP+szlMJ6X8M5kpATK8ebxPkOev7QyJjIk06sWylTQtjkZRj8oUAFgdRIsgirLqnqVE0V4wJUSCIH2+hD6CYgpRX/j1RPxypiQPWJFKgIlQN2DF1YhY07yuHEG+D4xyPBtQ36Qh836CdUNT1I9PsMAhtYrjlIzUtBOeDHH6MGPrzrJjDsLTaRJa4em0jRxmjGl4OImRoOqmgbgKT/8iqhHTD0PfpTrOMeNeWkPbyp6wNMv0W8gqcfx+Yc4fUmB1lwVPkjOKIEK6agiPtdO8zBEgucm5gSx2Fp7Mrb7I7Gi2TDJ6xMTExMbHx7cUc1JISMiNyMjIidUEzjZBTSOKHBw1GS5GgYCLFecbfwamuglmCiaDjDplzNxYIKI0Mu46ZtTLWJDzCzP4Bax+Sw2+EyOilHVTMdmFjGjmWOk47NlW9g5k5c6Ac3Bw1CyQjtMIRS6zgeUy1t3MKIi29E8Rco0C5xR7N8Zviih+/vnnFRc7atQoB96XOTj++2AvPef2hIOD4xklHGgKnI+IIJqC5UwWvNsscK7MJv7mMop0I9yoc3D895NFe+g5tyccHBwcVdtEPvTMwcHBwcHBwcFhFpwocnBwcHBwcHBwmMV/BBgAHTxEUMWGlxEAAAAASUVORK5CYII=); + background-repeat: no-repeat; + background-position: 0; +} +@media all and (-webkit-min-device-pixel-ratio: 1.5) { + + .redactor_toolbar li a { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABRQAAAAyCAYAAAAtK1dkAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAKodJREFUeNrsnQtcVNX2xzfDG+QtiG9QTE0rS4pMSVHDSjHN0Ewty/shzWumluY/zbTuVSz1qper9dcempl6y3c+/4Wamc98hyGCPARF3jA8Bpj/Wsw+eBgHGGBmzjnD+n4+mzmcOTOz93nsvfZvr72XjVarZQRBEARBEARBEARBEARBEMagolNAEARBEARBEARBEARBEISxkKBIEARBEARBEARBEARBEITRkKBIEARBEARBEARBEARBEITRkKBIEARBEARBEARBEARBEITRkKBIEARBEARBEARBEARBEITRkKBIEARBEARBEARBEARBEITRkKBIEARBEARBEARBEARBEITRkKBIEARBEARBEARBEARBEITRkKBIEARBEARBEARBEARBEITRkKBIEARBEARBEARBEARBEITR2NEpIAiCIIjmwejRoy36e1u3bqWTThAEQRAEQRBWCAmKBEEQBEEQBEEQBEEQRJ00dXB669atnvAdOXzbC15y6awqFxIUCYIgCIJoKC0g/R1Sb0gOkM5D+jekTDo1BEEQBEEQhqlLkBOLbfWhRDFOv3y4bYFyuEyaNOn7goKCCHP9gJub247169ePg011c7ufSVAkCIIgCKIh9IG0CVIgpOuQiiENhzQFEhpTh8z8+45vv/32rIyMjH9IeRL8/f3fX7Vq1QrYLKNbgiAIgiAIExDQwGPPy60A+h6IsJ2rv1+MBUTFtuYUExH4/hHw0obbxc0KEhQJgiAIc2Btoo/tBx98MDA1NfXj0tLSHpWVlS3MmW+VSlXo6Oh4pU2bNh8tXrz4MOwql8l17QdpH9N5Ij4F6QTf3xXSNkjfQ+rGzOup6Cf1fYVAHpbAy3eQUuhxtz6WLl2qteTvzZ4924bOOkEQBLF169Z/wUsv/i+KcL1qOdRTpkUI0Ns+b4TnZdVxZsqPr4XK7cdIUCSEjvCUKVMWFBUVjSgpKele593p6xsdExOzADZL6bQRBEHca1StSPSxf//99ycnJib+S6vVqiyRbxQsi4uLQxISEvbBb7+9ZMmStbBbI/HpFIuJoZDSRO9dgxQJ6Qqk9yHNMmM+WsvoPm/NSFBskr311ltvfZSdnf3WyJEje40ZMyYJ9mnptBAEQRDNFGwHv4G0k+nExO0KLINY6PSsT0yE9782c34c9H4PhUtTeEPqi70OzfGGJUGxJjYbN27scPjw4f3QketWyw3/ZVRU1Jjc3FxX/D8mJuY3eHFi8hIU3ceNG3dFo9G0M/oD7u4H7ezszqxdu3YRk6c4avvxxx8PvHTp0sG6DlKpVPnff/99B9jMo9uZICTFakSfnJwc/5SUlH9YSkzUB387MTFxV2Bg4E0Jz6FYTBzAdGLiJEhn2b0RZRQVr7J7o+rmwqUBhqHDwYMHW4eHh6ez+r1U7Y8fP+7bt29fLKPGSOPRhR71JuGnVqv/VllZ6R4fHz8V/p/PdFPoCYIgiKYJHTlN+QLoG36/bt06bOfVcs1/586dxyxevPhH7CdOnTp1YWZm5hz9Y5S2PAmfHny+IWspKvlehHLuYDrxNMmCefqGmcYbspcFbF7ZQ4JiTdyOHj36Y21iIqdcpVLZiv7HKSolMiuH+6ZNm97FG3zOnDmvQ0e0lfAGdEhvR0dHb8RKddeuXcHQeeoF7/vl5+eHw77w1157bVSPHj3Gzp49+wL8XymjMtnOnz8/A16nbd68+eXt27f31Wsscl599dUDwcHB++FfD2ZZQdFgRcnXgmDmagzMsdYEXyQYgywcgu/3NqVhYsFySNIAUznuoyGijzmeSVOJPnb79+8frNFo3HhdUzFt2rTELl26oEBVYab8q27duuW3ZMmSLhkZGbb427///vsgqL83MGmmPgtiYjbTiYnJkBYznSfiXD2jzFmC/NVlGHqlpKQ8C6/YNtT3PLknJSWF9u3b9xhs55PxaH4b9PPPPx+lVqtb4j+3b9/G9Y2WMxIUqQ2xYPmUll+yTQgjCRA2hgwZcmbSpEm4dAo6jLhFRUW9KTjG6L2viY+Pb7du3brnse8IoGOKD5NIUIRr/kZWVtbjCxcufBlsIS/hDScnJ82HH364OSgo6CT8Gw/JHpJDTEzMT2inrF+/PvLAgQPBvFxbYN9xSI5MQesdW5GYyOrysORiItpwsRZ+vs9DvmKbcH2oPRcbcyYSIIzJkKMwciBME4bPlkpwQWo9FytXrnwlLy/vsXqOu1FZWSnuROYx+Xn0YUcIp53Zd+/ePVMsKKpUKrzmcZDShw8fjikzOjp6+NmzZ6s6y8XFxV2vX7++HjYHyqzhxnN+G8sVHh7+h76gOGbMmLjg4OCjvNyW9k4MaOB+U/6uqdeaiIKEU0S9LFgWU5cjQKJ7lMrReNHH1JhS9HEA2gj/ODs7F3Xp0gWnH18yo3Fq16ZNmx7wW+gx7s4z0ZobxJYWFFFMRM9wYZqzWEzEqeSf6h0bBGmLhfNYq2EINoZfamoq5uk4HHOnHjvFOykpCcWtX+HYbHMbkcbaT2Y0FKVu1z3i4uLGCf/cvn37gY0bNw6aMGHCd8x8Yr1ZCQkJqUpffPEFKymRfKzZ2toQc5VPafkl24QwSoDAPyNHjkwbO3YstuGneP+ou55jDNMC8PIHpGywb9pBv9Bm5syZkU5OTtg3dJYo/9gHveDj42MH/buwPXv2VPdL2rdvrw4KCkLHl3PYn2W6GQXoBIOzOJwmTZrUCgVFeMV+IR6XyhS0NJkR04OT4P0Apd+gEoqJDTrfBo6XYnBD1vWunYUulM2xY8e65ebmToNOUcl77713iVdQcnq4W6jV6gFW0oigoHgZkrqoqKhGB6q8vBzP+Rmmm5aGD0TcSy+9ZHv27NmXq2vw3NxHv/rqq+def/31rTIy6jEfWJbSTZs2TRC/gQ1L3759v4XN3bxhsXSePRu439y/2+R+Lrs/Squngsoh1QLFVI66Oc+NBpMJKhYSROzs7e2dhH80Gg3WoTjafRryX2Gm/OPU6nz+W1XwPNha+F4QxET0Dsf2UV9MfFVU37ZlusjPKDyulFmb2BBve0naPLSTVq5c6Xft2rU3wRZ5trKyssZzaGNjU+Lo6HjZzc1t67Jly/bDvVdu4DvsZs2a9WxBQcGo0tLSntBHdK1xU6lUuc7Ozj8/8MADa2bMmHGLSbtWoWrXrl0haWlpweKdly9fnsjbckV6Ij3yyCPoPcO6du3KLly4IAtBwYp/17OZ5pdsE8Kods/Dw6Ng7NixXzFdwLRrvN9drOcYg84kKKb8znTCGw5iZjz99NO+f/zxh5+E+cc2AEXOgsLCwleYLtib0JdFL/ZfeX9WaN+xTbzJ7RXUGGZCOsqTNYmJKMIlQXpHyTenXMRETkAjjrf04Ias6107E90UNpMnT/Zeu3ZtNjwEhgxU58OHD78NnSOX/v37XwsICMCRf423tze6UWczeSzA7QqGtpuVNSbl0GjU5s2Cozko0J3u3LmzP5Q9EhqU6s7qrVu3hsHLXlb7tC+pcE5JSanhRcrXFTvPG5EKRjSFLyB1otNAENXYIKL/tdw4rbeuEQxDHM3ka+IY3RHgdbRWnAmmW2LDUvRnumnOxoqJOE0Yl0nA5TMyZXYNtQ04rtLSNgncH/azZs36G7S7n1ZUVLjWdhy00Y/m5uZOeOONN45FRkaOhnQbbS60wTZv3uw3adKk7woKCgbW9VtqtbrPqVOn3pkxY8YHK1asWMOkmwLmcu7cuZeGDh16JTY29sGioqKqezstLe2pkydPdgkJCTnDFBacpWPHjszTU2d7d+vWTQ6CIkEQzRc19LfRKzGW3RMTjbE9qoS8ESNGfA112BsS18NV9ha0izXaKejbVvLyGBosxP3CTDU5ziKs12as431BhEMUKyjKTEwU8iSOql0X5CVtgKYKig6+vr5vT5w4cZRWq8WH+jlmWIBqmZycPAI3Bg8ejGs04HoHdmAc74LPqlxdXX+IiYlZxaRd28AWaI5rShagDc+vX7Wg6OLigusQtmDyExR9MjIyaqxx2bp1a5zCjdOhyyXKU66Biqh6vbgGVFINwZLr0dVWRrmWw1x5pXIQDSUA/zRSVJSShoqJaBT6chsAOzDoGbCXd2LMTnR09Kt+fn59oR3TqFSqct4WYJtWNm/ePGc3NzeHBQsWjGrTpk0BHIP5rrSxsdFCquAdEy18jsExTnCsHbyGt2vXrmq+KhxvozuE2cAxqm+++aaniY1Yh7lz505PSUlZauxnCgsLQ/fs2fMbtNOh8PlbsbGxOL3rV7Va3dmYz6NomZaW9q/33nvP+9NPP/2nRB0un8TExGHTpk3bnZub2+r48eNV6yiWlZU5QXnGh4SE4CwLRa2l2KvXvaoaxUV/f3+MMi9llqy9DTFF+ZSWX7JNCGPJ/OCDD3DZlJuNqOPR2ecCtIWfMGnWT2zWNmMttoJYhFP0Os5gC6MmNEJUNqnXR01i96Jq11v/McsGj1FEvdsYAU0FFUyP27dvT83Ly3sFDNMqr75WrVr9BS/oGp2vbyx/8sknbxcVFXmDgZjctWvXX7j408rd3b0lrpkDRvCTY8eO/dDDw+M7+J6YhQsXXmGWDwhSFhYWdvrYsWPhza32AuO9dUlJib14X3BwcLwMs2oL99NTpaWljsIOZ2fnilGjRu2TQ0Wk0Wh2VT0g0DG1tbXNESocyO9G2LfLlD8IHdw8R0dHS1ZoSQoqh6HrUT3CCvtN7uVlznJgAwf1rCBq4NRXrcLKUevzHBQU9ERWVtYrxcXFA+H+6gK/HY9TMn18fL775z//eaqpU4plgKfIgFKKqCgWE3HNRIzmXJ+Y6M90YuIJSDi9agLvkFhEUJwzZ85ppos2XWkgOa9cuXIIHINCZyHTeTyIExO9Oq1evbrfu+++e5HdC7Zmo/fquHfvXpPkG+4H1VdffdUnMTFxsXj/gw8+WB4YGKhu2bIl5kELz7rdtWvX3CA5FBYWVh0Dz0zgoUOH/jN06NC/7dy5c7VYTHRxccEpt2WQCuGZqhpoy87OdkpKSnK+dOlSdVufnJw875tvvvnltddeO2phm8s+Ojp6XLt27a7Bs37y4Ycf9j1+/HiE8OaNGzdehJel/N5TxoPu6Vk1zVkMTn+WWFA0a1sotEWW6mxB3akSnld4drT65WtsmwfPVPKGDRtqLCdx4sQJ/I1Kc1yP2jqtSrNNrMDGsnbu8D55YxZzxRkSOP35LpNf4FGrBuqdr6Gum6i3r1pMRBsS/hfEJcasQ2gPYBJ7/sF5/aMB18iL2vOaNERQdJg6derbYLS+VFRUFCLsBIOw6LHHHssIDw/fVsvnfBMSEqoejOHDhx9gurX7ivD/+fPnbzt48ODL586d809NTXUDg/dNTK+//vpJMIj/a2GvxcKePXueAwMw88KFC77NqO5y27Fjx3TxjkGDBiWHhoYe550vOeEK91KN6VxBQUE4te4Gk9iT0lBFJFQ4EyZMOGumRseiFZqCyoEV4HmoHMWVq4cg6OD+2gIuyO164H2F3wuNRh4kJhY/oBxeSimHobZr7ty5o+/evft+Xl5etcdXSUnJg5ig8zAA3l8CedkKZdRYS2WrAFFRiObcEDERX3EgTiwmYmCnry2Y70yeV62B5FGii46B5zyP3S8iio2oFmVlZaW87TPU/mGdUmDCfLe4evXq+3C/Vz/cUVFRKYMHD8bp4zd5fvF8Y5RyDMqDwYFa8Dzf5NfKa8WKFZv5sQE8j2hj4RqJ6Xwbvx8HfzvGxsaGrl27tiMOUGi1WtXFixfnwf4XLdyGeiUmJo555plncK3eS2FhYeV79uwZlJKSUhWNPScnp9233347aPz48ZuYQpYxQTHxyJEjVQFZcA1F8T4pg7M0pJPUyLZCkujIFgpoZOry5Yo7zUIZzB3N1Vy2iQRCixcjGkIxa5qXd1M/TzRONNrJ64QR/L6vISaKxSXRthwx1qNODlOIAxpxvMXzLef23BhB0X7mzJmvp6enfyZ4I3p5eRX37t0767nnnktu3749ijk4mo8C1B29zKF34oyioiIf9E7s0qULGo9pcEIq4b07fn5+P4HBmAfpYTAkO+3bt6/D2bNnfcCYDEHREr0WW7du/e7y5cuxk2LuTiW6dF+bPHnyliVLlkTdvHnTwcorrSqBGDpPY4XI1q6urtoXX3wxOSIi4n+ZLoJpkczy7JGbm9tDvMPf3x87VbctcH80piIKsMDvnjdxhYIvN9j9a7UFKKkcekKB2FhXUjkCxCKUgYq+o8Kuh4Dtp59+OjA7O3se1D3dDB2AIqNKpZoHx92Fsh+2Ak9FsUEgV1FRHIClKWIiRn2ea+G834XzmVZLnVZZUlKCnaI8OOZuPfWfFo5FQbGgtusDx5hSUPSF56B6gLZPnz5ZgwcPxnVsf+HXAfOCU6LnJicnj9FoNPrrPL9Rq+Fmb1/Url27/0ZHRy/i34Oe/f4DBgy4euXKlXeOHDlStdh+VlbWE8zA7BIzgsFYgjHozKhRo9AzMgF39uzZMx7swEeEgy5dujQRXnYxhXhfoDfihg0bqjwVcRuRQXAWxdkgEpXD2stnFtvECq6HWYVcc3XcCeuFex/G8vtEuEfQo1ksJgrHyX0tvyRm3DRiqaYQ6z+Xcl9DUdbthDGCopu3t3coehDiPyNHjkwZO3bsSdj8k+kiCSdywzeL3T+S0RIMxDG48fTTT6PhiN6Jwqh/Ac94Cj4o7du3D4yKikJPle6bN28O2b59e3sUMPG3Yd9/mW76lDnBqQ3JPj4+O6ATa7t79+5hkPeWsbGxztZUWd28ebMNVET33TAPPvhgab9+/a5DZwYffvQkTWby8wzwuHXr1gN6+caF2/Mkzpe1RXm29G+Z9bv1DEZFRquuRVT0VOh91eLOnTtTc3JyutV1EL6PxzFd5EGpn3FTG405MutUmFJMnE3dAqPxUqvVHsI/nTp1Ogcv+yFdhHukDKdEgz0UmpCQ8LeGfrFGo3FNTEx87csvv9zyxhtvHERRHr4P7a2Sjh074vV+Ho8rLi5Gj0dvC5bZ9fjx46/26tULvTBvcdvOcejQobv27dtXLSimpaX1UUpwFhQNwbaq8kSMi4urFhQR3JZQULQWG4SiVcvUNlH49QiQqBxN6rg3wu69v+Hx8qrRX8flviDdrEdwISHUhIg9k8WDzCJRMYkfmqSg9bfFdm5uXfc5d2CRC3iu5b6GoqzbCWMERScwcivi4+MrMAowCn0HDx50bdu2bTakvVOmTPkDbppyAzeK3X/+859ROHWlc+fOWY8//jgayVXeifxGQwNRDcehZ2D6mjVrVGBADoI0ENdbxGNwfTz8bcyDhS4Wip1ovBZGRESgh96Db7311iOQ11BrqcD69u2bOX36dJyeng/XJnD//v39Dhw40Prq1auOkHpA52NBhw4dipYsWfKnzLKO6yf20V8/Ecrzm7WJDRJW/vjyOaQovgvFhGiZVfomNaoUdn1yrMCgw3ZhaEZGxjPGHIzH4fF86nM5b1tsoqOjAxITE/8+fvz4F3BfixYtdgYGBv57zpw5SUwBkWGhDAt54y2Hayme5jyA6cTET1j9YqL+monWIiZa8v5xsrOzq6yoqKhaGy49PR07eekoJgrt3qBBgxzB5ioBu6jBdhC0kZohQ4bgdGdMFbh8ANx7GWBnVc/Btbe3R5vM0ULltTlx4sQDqampEfD8usTGxo6r7UAMzrJv374pISEhf2cyDwqAwVh+//33qm0UFnHdRAzIguCrDIKzEARhuC2WIsiBuQmot0Nla2vfyO9VSoTbSldXVxysqpRp/mr0T/RnrtQnxsm5P6WwAITiPpbc11CUd+fOiGNKXnnllV2Q7Hbv3h0KRpNHfHy8919//RWFCf6P8/Hx2d6tW7d/T58+PZ0LhVU335UrV6bgRnh4OHY6UKAqEF0Mm5UrV7aeMmXK39Vq9cji4uJqb5UuXbrkPfnkk3kRERE4go1TXiy1AA3mHcUpvKkSeccJO1hWIyiWlpYW8E7gLS9g7Nixf0FHPGL58uVVDWp5ebnrjRs3YubPn2/38ccfr2HSTiUW0wLup+HiHUFBQXd451fqqdnWEuW5N6RIpvNW6cR04jpOv8thyoryXF/jZ46yWCQCoZ6oqMRyuGZlZT0P9ZCTkfWVEx7PdBGDhYED1/T09I+zs7OrxQjYnunk5NQKNicz+a39qm+I7GDyiViJ011RTMxk96I5o8D4AaQtrG4x8VdI65j1eSbaWPC3Kjp06JANNlXV9ONTp0493bt3b1+M3MxtqUo/P7/sVatWbTh9+nQ42ElGz5hwdHQsCQkJOeTm5pYpdKrQ7rpw4YLXmTNn+gvH+fv75zHLzUZw+vnnn1/p3r17wrx58zBIDrbhZfyc+0L5wz777LNqWzAjIwM9YH2YjAVFnOIM57pKSBS4du1ataCISBicxZxRISk6cvO9TtZyPZKY8V5JJjt3zALeTfVcHxdoX54Q74iMjMyG9Fcd/W2lCIkCGt6nl7IPW8MDUXT/GuyfyHyN7YAGHqu0+yWgEcdbuoyybieMERRRgMKh1+yIiIgzkHokJyc/sH///sBff/3VH4VASHMvXrw4GI7BlI/eiatXrx6dmZnZHb0Tw8LCsLJO1lsHyw0+s6OgoODxKivTyUnTr1+/jGeffTYRDGys1K7wAv7FTLsIujGUcUMXUytmRUAHHTvbaMhjFGfsnFxG8bZ9+/ZdU1JSqjsrsD0f60Cm81qRA9537tzpLd4BBjt2frOY9FOzDRklYqPBHAaLOYwSDLoiTH27YSHDy1zGVYCFjUhLusALDZkSy+Gen5/foMaQH+8OKQ+ngP7www/B6enpY/WPg32vLF68+MTcuXO/kGv9ayBSn6R1Kr93UFAawHRiIiJ4j05jNcVEHOATojkLYuJESMuZxGLi0qVLx/v6+j5pY2OjgYR5Lucdicp58+Y5urm5OXz44Ycvtm7dGm2JSjxGq9XicVqMkgdUCW4fffSRU4sWLRzg9Zm2bdsKU8KqBEb4jAqjrW/YsOEhE2Y9/4knnrgQHx9fdc4LCws9165d+8OPP/74P6Ghofu47ZMA+d/YrVu3hJ07dw7LycnxgbzYYKZ9fHwy33zzzSPr1q3rB+2jv7Afjs8dMWLEXnj9lbf1FfB97vBsPAN22T/gmfIRMtC7d28c7LWECG8TGxsb9Ndff42fPXv2l7y9Ea9p6QTnIh1skbmCLZKdnd122bJlE2fNmrWEyWdwswaGpjTj//37V2u2UgZnMadgYsk2z2qFH4VeJ2u5HnLzArPU9cE2rIaguG3bNu/IyMi1TBfsS+rnoamoDh061NbBwUEtcf8wwIDdXp+nX4Bc70k9MQvLUZst76nEh0YBayjKup0wRlBEI+4WN/ziILXp0KFD56ioqEcg9QAD9+GTJ0968mnKwsLennFxcThNRfBONKR8+oHh7t2qVavskJCQ3BdeeAEDu6CIiJZZAru3tk4ZI8xB1ZRzfq5PwnVIx8A4wptqtbrl/v37n3z22WfRQ1Rql3Gby5cvB2ZlZbUW7xw+fPhPTOc9Jzl1RXk2V1QmM7tc47TnaPH5VVo54Hu/hjxPNPZ6yfx6VJdJ4eVAQbFtQz6Qmpra7c0339weGBi4csGCBerCwsJpGJ32vgpNq7WB99CL+XuZGiuGIvVJCU5pRoEQg4Iki/YLg0g4gINLlXRgOs/E2sTEWVIXZPbs2ehNfYa3VZW8fRO2nVesWBE+Z84cDHRSxAxHghbaRKfVq1f3e/fdd3HQTaz+2IheXfbs2WOqrGeC7fMj2FB9rl+/jmsZsoKCgk6Qvk9ISMB1rWpvFG1stBMmTEDD8nD79u0ZdKDm4zMgvA+ffaq+H4dnSv3SSy/hGtWZZr5EtgsXLgxLTk5eW1FR4Q7PKXZaD+vZhWiP5j7xxBNDwRapDlRz7ty5uZ988knSvHnzMJJ1uZyeaQy6goIivg4ZMqTe4+A6y8I2aUybYKjOsuCASG3Cj0mWNZF6KZHapjeaKvozRXludtQnlFbiGoo5OTn6Hu/Yxz8pw/JoXVxcanip5+bm4iCzqpbj7fPy8nzc3NzuStxmeOpt1/k869v3MkMsZmE5tlvZMyMunzHPV5JctIbGtuembr/tGnBsGe9ooNcejnjj6HIgGMMPQeqYkZGRyTOqAmP7SfROxAorLCxsN9MtKHrfQz137twv/f39fZluRATXLEzkhm0Rk++6B9YGXpcsjUajH1CHQWXsze8RqUVdhyNHjtRYc61t27aFrVq1QhFaDoJiQAP3m/J3zTFSEsXFhNEWKos5yoGV/U5ukI+w0HUx1/UQC1I7RQ2ZEsvhUlhY6NaQD1RUVNiC4dsb0oZ6W/nc3J5MhqOjMhQTEQyYhoLhKb39KDDhGo+omqF42Ie3AUIAFlmJiRzsOOAgpCGh0L0MYLrBzlxWU0BketstSktLcRC1kN3vtSeIdaacMYHt15np06dvXb58+fjExEQHYz6EXpVwH50aNmwYXo+kIUOGnITn5NimTZtCoS03asp2UFBQ6TvvvLPN3t6+agaKOdvvWbNmvZeSkvKJsGPZsmW4nMoakZBjB/bgiwkJCVv0Pwzlcb548eKGyZMnD1+7du1rTEbTn9HzEKc3Hzhw4L73OnbsyMaMGVPjWAkExQATfo8cvWaofNKUL0DC82GNHoWWRqPX/rGhQ4dekXF+S9GTH+rZalu+pKQE28ra1oF0vnz5cgj0EXGmVbFMylCfmKhv38sNQaS2qrXpxShgDUVZt3d2jfhMJTeoMaUynVdhS39/f6ygUGxsceTIkXfwwIEDB6Lgc5kZHvm7A5/5gVcIdxl5I0qJCjoy7cU7vL29S/r27SuX6c5u2dnZj4l3dOrUKZnff3JoLKwpyvMhppvuPNqCZTHHd2OdE8srfqYnKiouOrJYkBLVp0qM8uxgzgciPz8fB6jc5WSEwbWbwY1EOYmJ6JmAnodfG3gPB/XQQwyjPAcx3fqVcyFdZ/IUE5G7cG5v1fLsVKrVarRP8uCYrHqeM4x6XCUo1nat4BiTCYo8SEo8dHy2Llq0qHLXrl3Df/75Z9+srKxaRcHg4OAS6Pxd7NGjBwbMucrtrj+ff/75LYGBgXZ79+599MyZM86VlYbHZL28vLTw+fThw4fv5B0YnPJcasZr47hs2bKjTCdS92A6YTad6daqFgIT2S9evBgHqtF2xOl4bfg9quW25jVe9+E+WQiK6HUYEhJSq5eeoeAsggApA9tETm0ClU955bP2qNvWTiUujSHeAe0e9sHlKhQVPfTQQ3/06dPn1okTJ7BtwOW7HFavXj182rRp2I6Il8OwjYmJCUtNTR0wf/58bHPy5VCAujz6ZDrgbPD5s1YxkSljDUVZt3d2Tfx8GdxcGfAw3OZGIvvtt996lZWVBfTs2fPWmDFjcOrZTUPeidxILGQ1PQkIy+MIle470BGv0QmPiIg4zTuWUk8xsjl58mQgGOFPi3e2adPmGm/86N4xHRiQZTDfFiI9d2b3r6eoFOoSFRVDLWKiYnF3dy/JyspyNVd9wUUHuZAECa9frswMxfrWFcLZAi+LjXQmXzGx3ntCpVLZMOOCreAxKmbZwCzY4Tnp6OhYGBkZeR3So3l5eR2uX7/um5GR0YLnvyIwMDDf19f3jo+PDy4LcxwSttGpGBEa6ggcXPupe/fumZD65ubmPpyenu6fnJzsUV5ejtdO6+fnp+7cuXOmt7c3XlucHo7ep3EW6HCV8ufgJ6E+FtXPwjOBHcJ0Xq4LtXwHCqey8DZBcTA8PLxKVKwLXEtRHJwFp0XjOoriAC4EQRBSA22OUM/KEaz342bMmPFVTk7OjLi4OBfceezYsQ9u3LiBS5r8D8+747Rp0xaVlZUNmTp16ucdO3b8k8lXJL3PvleymAjlwJmoAUp+BhSwhqKssTPBBcAXQRRUPfXUUwWQlvFOHY5KZ9YygktCogWuL1S2XcQ7wJAN2L17d5eIiIgbCxYs6A4dj5nQ8ZgovO/q6qodP3583KBBg76Ff1OYtFPPbb777ruOR48eXQcNRA3LPSUlxZFZLvp3fVhFlGfI57Y6OtJKi/Is7rTG8vIdMeM1MVckxWrvNgPfr8Qozzlr1qzBPOOC4PZN+SIcYLexqXG7okh2jukGq3xMmWl7e/vqEfCCggIXMGTbhIaGXqivfuQGYmPOpwp/o6ioyNlQHkwAzgZIZHoLs9eBICauZMoSE4V7RdWQc2/JvPFozvgs4zIy6Hn/i4eHh2/v3r1bwrYHu7fsCN5HKKqlMd307nwh0B33dMT2GnuFVzw9PdtC8uvevTuORDvyZwPfuyv6jrsW6kCWcVsipY5jcOAyg8knCFyt4FqI4vUSo6J0Y29Lly6t3qc/3VkABUjcj0KjoWnSFrJNGtUmSBxAyuzlk6gDq9TyWXvUbavuF65fvz4U+n41BnUx2OoPP/zQddSoUVL3+wxRyduPnxYtWuT8yy+/jDh16lSrs2fPuqalpc2E9m8mHuTu7n42ICDgz3nz5n3G21KMEVAs1wthRWLiDt5PeUfBz0USk/8airJuz+1M/H1oGKO34kFeAdxhNI1ZCtzHjRt3RaPRtNN/Az0RN27cuAdSjf39+/cvbNmypRqMXfRawGmvuIB9lhzLgPz222/PQ0r19/d/f9WqVSskvs8MVURKjPJsqspWbuUQREVPkUGqhOjI+H07WE1PHnNfE3NfD/SkwuAK2Ju2bcoX6YmJQvuTww1JUwqK5SEhIdc3b95cXlxcbJeXl9di9erVeyCZQkwy6jhnZ+eqPDDTeozjWonvMd16qWfrOO4rdk9MlKXBCOfxl/rOMbwuM/Z61HVdjL1mjRAUSninCZ8RFNvRCwPFQBQ4K/j7mKrXv9L7fAW///EZxunDKEY78ecM7bFS3rkqY5YbzDX5FCmpA2igGKgf1Vkf9EAUC4wK6STJrfNE5ZNv+cxlDyr1OikBx6lTpy7MzMycY+hN2N9qy5YtByCxPn36BM+YMeMPJi9hEZe6wGXUSsLCwq5BegS2WzGdh/1tfn/gtO1Mfp8k8fdk6bhkZWLiN/xfxQqKtQXGaoD91uzbO3MIivlMJmsWNGPcN23a9C7TqdgBkFrya13Jb6Y0fo2ceIWMr0KwHayw43ilrJG4DNjZfRRSRy4Q2Ik6Xjg9CtePOs47XVIKivVVRNbgHp2r8HLoi3LnFZhnRV+TukQfmVPm5eWVNGHChN+/+OKLflJkYNy4cacgDzdNXM8tYTqhEI0TjN58Se99XO8SPRMnMBmLiVaIll/nsiZ8XsOT1LZYgJm+k6YcNY92m8onz/Ll0jOoOJxiYmJ+4n07nLmGzhqCl6IwGIWe7xgXAQOjqpj8PBULuZ2Swvt+Huzeutw42IqzU+4yy3nfN8UexiWYqpdhEiLvyjCrtbbhessx9VLaA9HUPokpB5etod61Y0S9F1DkYooXMhk6legRh1PFrjJ5uuDn80YhnRk3fauUfyaLNyqlMinDZd7A1VYGNS9jKd2mBEGYCTRUEwcPHrzB09PTZefOnQ/dvHnTHtdCM6v17+SEUyc1L7zwwqXg4GA02m4w03oo4mj+MEg/Mt2ael8zXRTnTN7eTWK6wC0LIC2S2TUpHjZs2OU9e/b0lDITeG2YjKdUyQBPhXwnQRCENYMGy03eXzpbT98LBblKmZZDw22UTCu7PgFMpmLR1q1bvx49evREvX01PCzhf0ErQWhpgmYICYr1k8TuuZgKLtXYiTjEK94kGeZZEOOUjDWUgSCaM9Yi+mi58fp/wcHBxZCeYjqhDaekmit4B/4mDpjg9G0U+Y7zPJh6+s4pSN0g4fxM9ESMEr2Hy1+8zI+RGxmvvvrqF5DCYNtLojzg4NvPTDeoRRjG1Gut0TpqBEEQDQeFxJs8KQq+znCTgbbIxsJZN7b9O8/zJ8fTnwRpJ+TNUwhsWct07SR2b+pzkkxvpbLHH388+fTp0x3M9QMhISFJrJk6OdnoRY4nCIIgCFOASxUMhyQH0WcX04lzTQEH4NA7CpeJwKk2uM6dOQVFHInHQBrC+kAm8U6sZ5pGEC8bGrgVpvg9MxnJuMyFP09SRfVGkTqdXx/ykjcMPi8BzHRehcL6PyQqEgRBNAMULCga2/7JvV3D/A+A9AL/Hx2sYhXYDneGNApSKKQWZvh+nHJ/jOlm/SQ0t+eUBEWCIAjCHJDoI0/j3KK/J9NRd4IgCIIgCKJ+BHEUSWLKHNTDWUWtmc4pwMEM3499DIxHcYs1w6VwSFAkCIIgCIIgCIIgCIIgCMJoVHQKCIIgCIIgCIIgCIIgCIIwFgrKYiG2bdtm0BU0MjLShs4OQRAEQVB7TuUgCIIgCIIglGInkoeihTBkoJPRThAEQRDUnlM5CIIgCIIgCKXZiSQoSnRRyGgnCIIgCGrPqRwEQRAEQRCEEu1ECspCEARBEARBEARBEARBEITRkIciQRAEQRAEQRAEQRAEQRBGQ4IiQRAEQRAEQRAEQRAEQRBGQ4IiQRAEQRAEQRAEQRAEQRBG8/8CDACn2Bhs7uzfIwAAAABJRU5ErkJggg==); + background-size: auto 25px; + } + +} + +.redactor_toolbar li a:hover { + border-color: #98a6ba; + background-color: #dde4ef; + outline: none; +} +.redactor_toolbar li a:active, .redactor_toolbar li a.redactor_act { + border-color: #b5b5b5; + background-color: #ddd; + outline: none; +} + + +/* + BUTTONS + step 25px +*/ +body .redactor_toolbar li a.redactor_btn_html { background-position: 0px; } +body .redactor_toolbar li a.redactor_btn_formatting { background-position: -25px; } +body .redactor_toolbar li a.redactor_btn_bold { background-position: -50px; } +body .redactor_toolbar li a.redactor_btn_italic { background-position: -75px; } +body .redactor_toolbar li a.redactor_btn_deleted { background-position: -500px; } +body .redactor_toolbar li a.redactor_btn_unorderedlist { background-position: -100px; } +body .redactor_toolbar li a.redactor_btn_orderedlist { background-position: -125px; } +body .redactor_toolbar li a.redactor_btn_outdent { background-position: -150px; } +body .redactor_toolbar li a.redactor_btn_indent { background-position: -175px; } +body .redactor_toolbar li a.redactor_btn_image { background-position: -200px; } +body .redactor_toolbar li a.redactor_btn_video { background-position: -225px; } +body .redactor_toolbar li a.redactor_btn_file { background-position: -250px; } +body .redactor_toolbar li a.redactor_btn_table { background-position: -275px; } +body .redactor_toolbar li a.redactor_btn_link { background-position: -300px; } +body .redactor_toolbar li a.redactor_btn_fontcolor { background-position: -325px; } +body .redactor_toolbar li a.redactor_btn_backcolor { background-position: -350px; } +body .redactor_toolbar li a.redactor_btn_alignleft { background-position: -375px; } +body .redactor_toolbar li a.redactor_btn_aligncenter { background-position: -400px; } +body .redactor_toolbar li a.redactor_btn_alignright { background-position: -425px; } +body .redactor_toolbar li a.redactor_btn_justify { background-position: -450px; } +body .redactor_toolbar li a.redactor_btn_horizontalrule { background-position: -475px; } +body .redactor_toolbar li a.redactor_btn_underline { background-position: -525px; } + +body .redactor_toolbar li a.redactor_btn_fullscreen { background-position: -550px; } +body .redactor_toolbar li a.redactor_btn_normalscreen { background-position: -575px; } +body .redactor_toolbar li a.redactor_btn_clips { background-position: -600px; } + +body .redactor_toolbar li a.redactor_btn_alignment { background-position: -625px; } + +/* + Toolbar classes +*/ +.redactor_format_blockquote { + font-style: italic; + color: #666 !important; + padding-left: 10px; +} +.redactor_format_pre { + font-family: monospace, sans-serif; +} +.redactor_format_h1, .redactor_format_h2, .redactor_format_h3, .redactor_format_h4 { + font-weight: bold; +} +.redactor_format_h1 { + font-size: 30px; + line-height: 36px; +} +.redactor_format_h2 { + font-size: 24px; + line-height: 36px; +} +.redactor_format_h3 { + font-size: 20px; + line-height: 30px; +} +.redactor_format_h4 { + font-size: 16px; + line-height: 26px; +} + +/* + DROPDOWN +*/ +.redactor_dropdown { + font-family: Helvetica, Arial, Verdana, Tahoma, sans-serif; + top: 28px; + left: 0; + z-index: 2004; + position: absolute; + width: 200px; + background-color: #fff; + border: 1px solid #ccc; + font-size: 13px; + -webkit-box-shadow: 0 2px 4px #ccc; + -moz-box-shadow: 0 2px 4px #ccc; + box-shadow: 0 2px 4px #ccc; + line-height: 21px; + padding: 10px; +} +.redactor_separator_drop { + border-top: 1px solid #ddd; + padding: 0 !important; + line-height: 0; + font-size: 0; +} +.redactor_dropdown a { + display: block; + color: #000; + padding: 3px 5px; + text-decoration: none; +} +.redactor_dropdown a:hover { + color: #444 !important; + text-decoration: none; + background-color: #dde4ef; +} + +/* ColorPicker */ +.redactor_color_link { + padding: 0 !important; + width: 15px !important; + height: 15px !important; + box-shadow: 0 1px 2px rgba(0, 0, 0, .2) inset !important; + border-radius: 4px !important; + float: left !important; + border: 2px solid #fff !important; + font-size: 0; +} +.redactor_color_none { + font-size: 11px; +} + + + +/* MODAL */ +#redactor_modal_overlay { + position: fixed; + margin: auto; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 50000; + + -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; + filter:alpha(opacity=50); + opacity: 0.50; + + background-color: #333 !important; +} + +#redactor_modal { + background: #f7f7f7; + background: -moz-linear-gradient(top, #f7f7f7 0%, #e2e2e2 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f7f7f7), color-stop(100%,#e2e2e2)); + background: -webkit-linear-gradient(top, #f7f7f7 0%,#e2e2e2 100%); + background: -o-linear-gradient(top, #f7f7f7 0%,#e2e2e2 100%); + background: -ms-linear-gradient(top, #f7f7f7 0%,#e2e2e2 100%); + background: linear-gradient(to bottom, #f7f7f7 0%,#e2e2e2 100%); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f7f7f7', endColorstr='#e2e2e2',GradientType=0 ); + text-shadow: 0 1px 0 #fff; + padding: 0; + position: fixed; + top: 50%; + left: 50%; + box-shadow: 0px 5px 60px #000; + border-radius: 3px; + z-index: 50001; + font-family: Helvetica, Arial, Verdana, Tahoma, sans-serif; + font-size: 12px !important; + color: #000; +} +#redactor_modal_header { + padding: 11px 30px 0 15px; + font-size: 12px; + border-radius: 3px 3px 0 0; + font-weight: bold; +} +#redactor_modal_content { + padding: 20px 30px; + +} +#redactor_modal_close { + position: absolute; + right: 5px; + top: 5px; + font-size: 20px; + width: 20px; + height: 20px; + color: #777; + cursor: pointer; +} +#redactor_modal_close:hover { + color: #000; +} +#redactor_modal label { + margin: 10px 0 3px 0 !important; + padding: 0 !important; + float: none !important; + display: block !important; +} +#redactor_modal textarea { + margin-top: 4px; + display: block; +} +.redactor_input { + width: 99%; + font-size: 14px; +} +.redactor_modal_box { + height: 350px; + overflow: auto; + margin-bottom: 10px; +} +#redactor_image_box { + height: 270px; + overflow: auto; + margin-bottom: 10px; +} +#redactor_image_box_select { + display: block; + width: 200px; + margin-bottom: 15px; +} +#redactor_image_box img { + margin-right: 10px; + margin-bottom: 10px; + cursor: pointer; + max-width: 100px; +} +#redactor_tabs { + margin-bottom: 18px; +} +#redactor_tabs a { + display: inline-block; + border: 1px solid #d2d2d2; + padding: 4px 14px; + font-size: 12px; + background-color: #fff; + text-decoration: none; + color: #000; + line-height: 1; + border-radius: 10px; + margin-right: 5px; +} +#redactor_tabs a:hover, #redactor_tabs a.redactor_tabs_act { + background-color: #ddd; + padding: 5px 15px; + box-shadow: 0 1px 2px rgba(0, 0, 0, .4) inset; + border: none; + text-shadow: 0 1px 0 #eee; + color: #777 !important; + text-decoration: none !important; +} +#redactor_modal_footer { + padding: 9px 30px 20px 30px; + border-radius: 0 0 3px 3px; + text-align: right; +} + +#redactor_modal input[type="radio"], +#redactor_modal input[type="checkbox"] { + position: relative; + top: -1px; +} +#redactor_modal input[type="text"], +#redactor_modal input[type="password"], +#redactor_modal input[type="email"], +#redactor_modal textarea { + position: relative; + z-index: 2; + font-family: Helvetica, Arial, Tahoma, sans-serif; + height: 23px; + border: 1px solid #ccc; + margin: 0; + padding: 1px 2px; + background-color: white; + color: #333; + font-size: 13px; + line-height: 1; + border-radius: 1px; + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) inset; + -webkit-transition: border 0.3s ease-in; + -moz-transition: border 0.3s ease-in; + -ms-transition: border 0.3s ease-in; + -o-transition: border 0.3s ease-in; + transition: border 0.3s ease-in; +} +#redactor_modal textarea { + line-height: 1.4em; +} +#redactor_modal input:focus, +#redactor_modal textarea:focus { + outline: none; + border-color: #5ca9e4; + box-shadow: 0 0 0 2px rgba(70, 161, 231, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2) inset; +} + +.redactor_modal_btn { + margin-left: 8px; + position: relative; + cursor: pointer; + outline: none; + display: inline-block; + text-align: center; + text-decoration: none; + font-family: Helvetica, Arial, Verdana, Tahoma, sans-serif; + line-height: 1; + font-size: 12px; + font-weight: normal; + padding: 6px 16px 5px 16px; + border-radius: 4px; + background-color: #f3f3f3; + background-image: -moz-linear-gradient(top, #ffffff, #e1e1e1); + background-image: -ms-linear-gradient(top, #ffffff, #e1e1e1); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e1e1e1)); + background-image: -webkit-linear-gradient(top, #ffffff, #e1e1e1); + background-image: -o-linear-gradient(top, #ffffff, #e1e1e1); + background-image: linear-gradient(top, #ffffff, #e1e1e1); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e1e1e1', GradientType=0); + border: 1px solid #ccc; + border-bottom-color: #aaa; + box-shadow: 0 1px 1px rgba(0, 0, 0, .1); + text-shadow: 0 1px 0px #ffffff; + color: #000; +} +.redactor_modal_btn:hover { + color: #555; +} +.redactor_modal_btn:hover { + filter: none; + background: none; + background: #f3f3f3; + text-shadow: 0 1px 0px rgba(255, 255, 255, 0.8); + text-decoration: none; +} + + +/* Drag and Drop Area */ +.redactor_droparea { + position: relative; + width: 100%; + margin: auto; + margin-bottom: 5px; +} +.redactor_droparea .redactor_dropareabox { + z-index: 1; + position: relative; + text-align: center; + width: 99%; + background-color: #fff; + padding: 60px 0; + border: 2px dashed #bbb; +} +.redactor_droparea .redactor_dropareabox, .redactor_dropalternative { + color: #555; + font-size: 12px; +} +.redactor_dropalternative { + margin: 4px 0 2px 0; +} +.redactor_dropareabox.hover { + background: #efe3b8; + border-color: #aaa; +} +.redactor_dropareabox.error { + background: #f7e5e5; + border-color: #dcc3c3; +} +.redactor_dropareabox.drop { + background: #f4f4ee; + border-color: #e0e5d6; +} diff --git a/app/assets/stylesheets/vendor/framework/variables.less b/app/assets/stylesheets/vendor/framework/variables.less index 74f9655..98332d2 100755 --- a/app/assets/stylesheets/vendor/framework/variables.less +++ b/app/assets/stylesheets/vendor/framework/variables.less @@ -53,7 +53,7 @@ @baseLineHeight: 20px; @altFontFamily: @serifFontFamily; -@headingsFontFamily: Desyrel; // empty to use BS default, @baseFontFamily +@headingsFontFamily: Stylograph; // empty to use BS default, @baseFontFamily @headingsFontWeight: normal; // instead of browser default, bold @headingsColor: inherit; // empty to use BS default, @textColor @@ -70,7 +70,7 @@ @paddingSmall: 2px 10px; // 26px @paddingMini: 0 6px; // 22px -@baseBorderRadius: 4px; +@baseBorderRadius: 8px; @borderRadiusLarge: 6px; @borderRadiusSmall: 3px; diff --git a/app/controllers/admin/admins_controller.rb b/app/controllers/admin/admins_controller.rb index d2944cf..ce4a946 100644 --- a/app/controllers/admin/admins_controller.rb +++ b/app/controllers/admin/admins_controller.rb @@ -47,7 +47,7 @@ end def create - @admin = Admin.new(params[:admin]) + @admin = Admin.new(params.require(:admin).permit!) respond_to do |format| if @admin.save @@ -72,7 +72,7 @@ end end respond_to do |format| - if @admin.update_attributes(params[:admin]) + if @admin.update_attributes(params.require(:admin).permit!) flash[:notice] = "L'administrateur "+@admin.email.to_s+" à été modifié avec succès." format.html { redirect_to(admin_admins_path) } diff --git a/app/controllers/admin/newsgroups_controller.rb b/app/controllers/admin/newsgroups_controller.rb index 9638819..d4fb348 100644 --- a/app/controllers/admin/newsgroups_controller.rb +++ b/app/controllers/admin/newsgroups_controller.rb @@ -42,7 +42,7 @@ class Admin::NewsgroupsController < ApplicationController def create - @newsgroup = Newsgroup.new(params[:newsgroup]) + @newsgroup = Newsgroup.new(params.require(:newsgroup).permit!) if @newsgroup.save @@ -57,7 +57,7 @@ class Admin::NewsgroupsController < ApplicationController def update @newsgroup = Newsgroup.find(params[:id]) - if @newsgroup.update_attributes(params[:newsgroup]) + if @newsgroup.update_attributes(params.require(:newsgroup).permit!) flash[:notice] = 'Le groupe à bien été éditer.' redirect_to :action => :index diff --git a/app/controllers/admin/newsletters_controller.rb b/app/controllers/admin/newsletters_controller.rb index f8b9fa1..b4acd4c 100755 --- a/app/controllers/admin/newsletters_controller.rb +++ b/app/controllers/admin/newsletters_controller.rb @@ -25,7 +25,7 @@ class Admin::NewslettersController < ApplicationController def create @h2 = "Creer une newsletter" - @newsletter = Newsletter.new(params[:newsletter]) + @newsletter = Newsletter.new(params.require(:newsletter).permit!) if @newsletter.save @@ -43,7 +43,7 @@ class Admin::NewslettersController < ApplicationController def update @h2 = "Editer une newsletter" @newsletter = Newsletter.find(params[:id]) - if @newsletter.update_attributes(params[:newsletter]) + if @newsletter.update_attributes(params.require(:newsletter).permit!) flash[:notice]= "La newsletter à été mise à jour" redirect_to :action => :index else diff --git a/app/controllers/admin/notes_controller.rb b/app/controllers/admin/notes_controller.rb index 924dd89..a80a58e 100644 --- a/app/controllers/admin/notes_controller.rb +++ b/app/controllers/admin/notes_controller.rb @@ -20,7 +20,7 @@ class Admin::NotesController < ApplicationController end def create - @note = Note.new(params[:note]) + @note = Note.new(params.require(:note).permit!) @note.admin = current_admin if @note.save @@ -36,7 +36,7 @@ class Admin::NotesController < ApplicationController @note = Note.find(params[:id]) - if @note.update_attributes(params[:note]) + if @note.update_attributes(params.require(:note).permit!) else render :action => :edit diff --git a/app/controllers/admin/people_controller.rb b/app/controllers/admin/people_controller.rb index 6cc5097..d2c08f7 100644 --- a/app/controllers/admin/people_controller.rb +++ b/app/controllers/admin/people_controller.rb @@ -51,7 +51,7 @@ class PeopleController < ApplicationController # POST /people # POST /people.xml def create - @person = Person.new(params[:person]) + @person = Person.new(params.require(:person).permit!) respond_to do |format| if @person.save @@ -83,7 +83,7 @@ class PeopleController < ApplicationController @person = Person.find(params[:id]) respond_to do |format| - if @person.update_attributes(params[:person]) + if @person.update_attributes(params.require(:person).permit!) format.html { redirect_to(@person, :notice => 'Person was successfully updated.') } format.xml { head :ok } format.js { render(:update){|page| page.replace 'sheet_person_'+@person.id.to_s, :partial => "person", :object => @person} } diff --git a/app/controllers/admin/petitions_controller.rb b/app/controllers/admin/petitions_controller.rb index 3ca2120..44b92f4 100644 --- a/app/controllers/admin/petitions_controller.rb +++ b/app/controllers/admin/petitions_controller.rb @@ -31,7 +31,7 @@ class Admin::PetitionsController < ApplicationController end def create - @petition = Petition.new(params[:petition]) + @petition = Petition.new(params.require(:petition).permit!) if @petition.save @@ -49,7 +49,7 @@ class Admin::PetitionsController < ApplicationController @petition = Petition.find(params[:id]) - if @petition.update_attributes(params[:petition]) + if @petition.update_attributes(params.require(:petition).permit!) redirect_to admin_petitions_url, notice: 'Les infos sur la pétition ont été mise à jour.' else diff --git a/app/controllers/admin/sheet_years_controller.rb b/app/controllers/admin/sheet_years_controller.rb index d9a25f5..f5ff40b 100644 --- a/app/controllers/admin/sheet_years_controller.rb +++ b/app/controllers/admin/sheet_years_controller.rb @@ -51,7 +51,7 @@ class SheetYearsController < ApplicationController # POST /sheet_years # POST /sheet_years.xml def create - @sheet_year = SheetYear.new(params[:sheet_year]) + @sheet_year = SheetYear.new(params.require(:sheet_year).permit!) respond_to do |format| @@ -77,7 +77,7 @@ class SheetYearsController < ApplicationController respond_to do |format| - if @sheet_year.update_attributes(params[:sheet_year]) + if @sheet_year.update_attributes(params.require(:sheet_year).permit!) format.html { redirect_to(@sheet_year, :notice => 'SheetYear was successfully updated.') } format.xml { head :ok } format.js { render(:update){|page| page.replace 'sheet_year_'+@sheet_year.id.to_s, :partial => "sheet_year", :object => @sheet_year} } diff --git a/app/controllers/admin/sheets_controller.rb b/app/controllers/admin/sheets_controller.rb index d9f8700..d5e915a 100644 --- a/app/controllers/admin/sheets_controller.rb +++ b/app/controllers/admin/sheets_controller.rb @@ -7,7 +7,7 @@ class Admin::SheetsController < ApplicationController layout "admin" require 'csv' -require 'iconv' +#require 'iconv' # require_permission 'adherent.show' # require_permission 'adherent.add', :only => [:new, :create] @@ -86,7 +86,7 @@ require 'iconv' def create - @sheet = Sheet.new(params[:sheet]) + @sheet = Sheet.new(params.require(:sheet).permit!) respond_to do |format| if @sheet.save @@ -106,7 +106,7 @@ require 'iconv' @sheet = Sheet.find(params[:id]) - if @sheet.update_attributes(params[:sheet]) + if @sheet.update_attributes(params.require(:sheet).permit!) @sheet = Sheet.find(params[:id]) else diff --git a/app/controllers/admin/tiny_urls_controller.rb b/app/controllers/admin/tiny_urls_controller.rb index 43df4c3..239012a 100644 --- a/app/controllers/admin/tiny_urls_controller.rb +++ b/app/controllers/admin/tiny_urls_controller.rb @@ -17,7 +17,7 @@ class Admin::TinyUrlsController < ApplicationController end def create - @tiny_url = TinyUrl.new(params[:tiny_url]) + @tiny_url = TinyUrl.new(params.require(:tiny_url).permit!) if @tiny_url.save @@ -34,7 +34,7 @@ class Admin::TinyUrlsController < ApplicationController @tiny_url = TinyUrl.find(params[:id]) - if @tiny_url.update_attributes(params[:tiny_url]) + if @tiny_url.update_attributes(params.require(:tiny_url).permit!) redirect_to admin_tiny_urls_url, notice: 'Url courte modifiée.' else diff --git a/app/controllers/admin/topics_controller.rb b/app/controllers/admin/topics_controller.rb index 2807a90..e447d91 100644 --- a/app/controllers/admin/topics_controller.rb +++ b/app/controllers/admin/topics_controller.rb @@ -25,7 +25,7 @@ class Admin::TopicsController < ApplicationController end def create - @topic = Topic.new(params[:topic]) + @topic = Topic.new(params.require(:topic).permit!) @topic.admin = current_admin if @topic.save @@ -41,7 +41,7 @@ class Admin::TopicsController < ApplicationController @topic = Topic.find(params[:id]) - if @topic.update_attributes(params[:topic]) + if @topic.update_attributes(params.require(:topic).permit!) @topics = Topic.all else render :action => :edit diff --git a/app/controllers/forum/auths_controller.rb b/app/controllers/forum/auths_controller.rb index 6ff6ba3..dc85e21 100644 --- a/app/controllers/forum/auths_controller.rb +++ b/app/controllers/forum/auths_controller.rb @@ -1,23 +1,25 @@ # -*- encoding : utf-8 -*- class Forum::AuthsController < ApplicationController - layout "forum" + layout "connexion" def new + @forum = true end def create + @forum = true user = ForumUser.find_by_email(params[:email]) if user && user.authenticate(params[:password]) session[:forum_user_id] = user.id - redirect_to forum_forum_users_path, notice: "Connecté !" + redirect_to forum_forum_topics_path, notice: "Connecté !" else flash.now.alert = "Email ou mot de passe incorect" render "new" end end - def logout + def destroy session[:forum_user_id] = nil - redirect_to forum_forum_users_path, notice: "Logged out!" + redirect_to forum_forum_users_path, notice: "Déconnecté." end end diff --git a/app/controllers/forum/forum_categories_controller.rb b/app/controllers/forum/forum_categories_controller.rb index 845fa9f..96b6909 100644 --- a/app/controllers/forum/forum_categories_controller.rb +++ b/app/controllers/forum/forum_categories_controller.rb @@ -22,7 +22,7 @@ class Forum::ForumCategoriesController < ApplicationController end def create - @category = ForumCategory.new(params[:forum_category]) + @category = ForumCategory.new(params.require(:forum_category).permit!) if @category.save redirect_to forum_forum_path(@category.forum) @@ -35,7 +35,7 @@ class Forum::ForumCategoriesController < ApplicationController def update @category = ForumCategory.find(params[:id]) - if @category.update_attributes(params[:forum_category]) + if @category.update_attributes(params.require(:forum_category).permit!) redirect_to forum_forum_path(@category.forum) else diff --git a/app/controllers/forum/forum_messages_controller.rb b/app/controllers/forum/forum_messages_controller.rb index 7ec6717..b22a922 100644 --- a/app/controllers/forum/forum_messages_controller.rb +++ b/app/controllers/forum/forum_messages_controller.rb @@ -22,11 +22,11 @@ class Forum::ForumMessagesController < ApplicationController end def create - @message = ForumMessage.new(params[:forum_message]) + @message = ForumMessage.new(params.require(:forum_message).permit!) @message.forum_user = current_fuser if @message.save - redirect_to forum_forum_topic_path(@message.forum_topic_id) + redirect_to forum_forum_topic_path(@message.forum_topic_id, :anchor => "forum_message_#{@message.id}") else render :action => "new" @@ -37,8 +37,8 @@ class Forum::ForumMessagesController < ApplicationController @message = ForumMessage.find(params[:id]) - if @message.update_attributes(params[:forum_message]) - redirect_to forum_forum_topic_path(@message.forum_topic_id) + if @message.update_attributes(params.require(:forum_message).permit!) + redirect_to forum_forum_topic_path(@message.forum_topic_id, :anchor => "forum_message_#{@message.id}") else render :action => "edit" diff --git a/app/controllers/forum/forum_topics_controller.rb b/app/controllers/forum/forum_topics_controller.rb index 1b34c83..20528f9 100644 --- a/app/controllers/forum/forum_topics_controller.rb +++ b/app/controllers/forum/forum_topics_controller.rb @@ -4,6 +4,9 @@ class Forum::ForumTopicsController < ApplicationController before_filter :auth_fuser + def index + @forum_topics = ForumTopic.order("created_at DESC").all + end def show @topic = ForumTopic.find(params[:id]) @@ -23,7 +26,8 @@ class Forum::ForumTopicsController < ApplicationController end def create - @topic = ForumTopic.new(params[:forum_topic]) + + @topic = ForumTopic.new(params.require(:forum_topic).permit!) @topic.forum_user = current_fuser if @topic.save redirect_to [:forum, @topic] @@ -36,7 +40,7 @@ class Forum::ForumTopicsController < ApplicationController def update @topic = ForumTopic.find(params[:id]) - if @topic.update_attributes(params[:forum_topic]) + if @topic.update_attributes(params.require(:forum_topic).permit!) redirect_to forum_forum_category_path(@topic.category) else @@ -50,7 +54,7 @@ class Forum::ForumTopicsController < ApplicationController def destroy @topic = ForumTopic.find(params[:id]) @topic.destroy - redirect_to forum_forum_category_path(@topic.category) + redirect_to forum_forum_topics_path() end diff --git a/app/controllers/forum/forum_users_controller.rb b/app/controllers/forum/forum_users_controller.rb index a05841d..6b4897e 100644 --- a/app/controllers/forum/forum_users_controller.rb +++ b/app/controllers/forum/forum_users_controller.rb @@ -1,7 +1,7 @@ class Forum::ForumUsersController < ApplicationController layout "forum" - before_filter :auth_fuser + before_filter :auth_fuser, :except => [:new, :create] def index @@ -16,7 +16,7 @@ class Forum::ForumUsersController < ApplicationController def new - @user = ForumUser.new + @user = ForumUser.new(:sheet_number => params[:i], :email => params[:email]) end @@ -26,10 +26,15 @@ class Forum::ForumUsersController < ApplicationController end def create - @user = ForumUser.new(params[:forum_user]) + @user = ForumUser.new(params.require(:forum_user).permit!) if @user.save - redirect_to forum_forum_users_path + + @user.authenticate(params[:password]) + session[:forum_user_id] = @user.id + redirect_to forum_forum_topics_path, notice: "Vous êtes désormais inscrit." + + else render :action => "new" @@ -39,7 +44,7 @@ class Forum::ForumUsersController < ApplicationController def update @user = ForumUser.find(params[:id]) - if @user.update_attributes(params[:forum_user]) + if @user.update_attributes(params.require(:forum_user).permit!) redirect_to forum_forum_user_path(@user) else diff --git a/app/controllers/petitions_controller.rb b/app/controllers/petitions_controller.rb index cb10076..5861ab9 100644 --- a/app/controllers/petitions_controller.rb +++ b/app/controllers/petitions_controller.rb @@ -10,7 +10,7 @@ class PetitionsController < ApplicationController def create - @signator = PetitionSignator.new(params[:petition_signator]) + @signator = PetitionSignator.new(params.require(:petition_signator).permit!) @petition = @signator.petition @title = "Le Pic Vert - "+@petition.name diff --git a/app/controllers/plaquettes_controller.rb b/app/controllers/plaquettes_controller.rb index c4acddf..478b2f6 100644 --- a/app/controllers/plaquettes_controller.rb +++ b/app/controllers/plaquettes_controller.rb @@ -13,4 +13,9 @@ class PlaquettesController < ApplicationController end + + def gaspillage + + render :layout => "gaspillage" + end end diff --git a/app/controllers/survey_sets_controller.rb b/app/controllers/survey_sets_controller.rb index 51584b1..260fa08 100644 --- a/app/controllers/survey_sets_controller.rb +++ b/app/controllers/survey_sets_controller.rb @@ -16,7 +16,7 @@ class SurveySetsController < ApplicationController def create - @survey_set = SurveySet.new(params[:survey_set]) + @survey_set = SurveySet.new(params.require(:survey_set).permit!) @title = "Le Pic Vert - Sondage : "+@survey_set.survey_type.name diff --git a/app/helpers/icon_helper.rb b/app/helpers/icon_helper.rb index 689a286..9632da7 100644 --- a/app/helpers/icon_helper.rb +++ b/app/helpers/icon_helper.rb @@ -5,12 +5,12 @@ module IconHelper def i(icon_name, options = {:icon => true}) if options[:icon] - raw ('') + raw ('') else - raw ('') + raw ('') end diff --git a/app/helpers/plaquettes_helper.rb b/app/helpers/plaquettes_helper.rb index 3975ec3..dcdc807 100644 --- a/app/helpers/plaquettes_helper.rb +++ b/app/helpers/plaquettes_helper.rb @@ -66,7 +66,8 @@ module PlaquettesHelper end def quizz_answer(question_id, value, response=false, num=1) response = true if value[4] == true - raw(content_tag("div",raw(radio_button("quizz_#{num}", "question_#{question_id}", value[0].to_slug)+label("quizz_#{num}", "question_#{question_id}_#{value[0].to_slug}", " #{value[0]} ")+raw(content_tag("span",(response ? "Vrai"+(","if value[1]).to_s+" " : "Faux"+(","if value[1]).to_s+" ")+value[1].to_s, :class => "info")))+raw((content_tag("div",image_tag(value[2])+(content_tag("p", value[3]) if value[3] ).to_s, :class => "quizz_img") if value[2])), :class => "quizz_answer "+("response" if response).to_s)) + value[5] = true if value[5] != false + raw(content_tag("div",raw(radio_button("quizz_#{num}", "question_#{question_id}", value[0].to_slug)+label("quizz_#{num}", "question_#{question_id}_#{value[0].to_slug}", " #{value[0]} ")+raw(content_tag("span",((response ? "Vrai"+(","if value[1]).to_s+" " : "Faux"+(","if value[1]).to_s+" ")if value[5] == true).to_s+value[1].to_s, :class => "info")))+raw((content_tag("div",image_tag(value[2])+(content_tag("p", value[3]) if value[3] ).to_s, :class => "quizz_img") if value[2])), :class => "quizz_answer "+("response" if response).to_s)) end end diff --git a/app/models/admin.rb b/app/models/admin.rb index 8079820..59dc51a 100644 --- a/app/models/admin.rb +++ b/app/models/admin.rb @@ -9,7 +9,7 @@ class Admin < ActiveRecord::Base attr_accessor :login # Setup accessible (or protected) attributes for your model - attr_accessible :email, :password, :password_confirmation, :remember_me, :username, :name, :firstname, :file + #attr_accessible :email, :password, :password_confirmation, :remember_me, :username, :name, :firstname, :file # attr_accessible :title, :body mount_uploader :file, AvatarUploader diff --git a/app/models/answer_set.rb b/app/models/answer_set.rb index 42d4acd..a466993 100644 --- a/app/models/answer_set.rb +++ b/app/models/answer_set.rb @@ -3,7 +3,7 @@ class AnswerSet < ActiveRecord::Base belongs_to :question_set belongs_to :survey_item_answer - attr_accessible :content, :survey_item_answer_id, :is_checked, :position + #attr_accessible :content, :survey_item_answer_id, :is_checked, :position before_validation do diff --git a/app/models/donate.rb b/app/models/donate.rb index 7a4fedd..7798056 100644 --- a/app/models/donate.rb +++ b/app/models/donate.rb @@ -2,6 +2,6 @@ class Donate < ActiveRecord::Base belongs_to :sheet - attr_accessible :paid_at, :amount, :payment_type, :bank, :check_number + #attr_accessible :paid_at, :amount, :payment_type, :bank, :check_number end diff --git a/app/models/forum.rb b/app/models/forum.rb index 254eb66..f4f16c9 100644 --- a/app/models/forum.rb +++ b/app/models/forum.rb @@ -1,5 +1,5 @@ class Forum < ActiveRecord::Base - attr_accessible :description, :title + #attr_accessible :description, :title has_many :forum_categories end diff --git a/app/models/forum_category.rb b/app/models/forum_category.rb index 28c533a..d326f1c 100644 --- a/app/models/forum_category.rb +++ b/app/models/forum_category.rb @@ -1,5 +1,5 @@ class ForumCategory < ActiveRecord::Base - attr_accessible :description, :parent_id, :title, :forum_id + #attr_accessible :description, :parent_id, :title, :forum_id belongs_to :forum has_many :forum_topics, :foreign_key => :category_id diff --git a/app/models/forum_message.rb b/app/models/forum_message.rb index 3742ab3..811fc81 100644 --- a/app/models/forum_message.rb +++ b/app/models/forum_message.rb @@ -2,7 +2,7 @@ class ForumMessage < ActiveRecord::Base belongs_to :forum_user - attr_accessible :description, :title, :forum_topic_id, :forum_user, :forum_user_id + #attr_accessible :description, :title, :forum_topic_id, :forum_user, :forum_user_id validates :description, :presence => true diff --git a/app/models/forum_topic.rb b/app/models/forum_topic.rb index 55de151..4d66024 100644 --- a/app/models/forum_topic.rb +++ b/app/models/forum_topic.rb @@ -2,7 +2,7 @@ class ForumTopic < ActiveRecord::Base belongs_to :forum_user - attr_accessible :description, :title, :forum_messages_attributes, :category_id + #attr_accessible :description, :title, :forum_messages_attributes, :category_id diff --git a/app/models/forum_user.rb b/app/models/forum_user.rb index 958a5d6..ad50497 100644 --- a/app/models/forum_user.rb +++ b/app/models/forum_user.rb @@ -1,9 +1,11 @@ class ForumUser < ActiveRecord::Base - attr_accessible :bio, :email, :firstname, :name, :password, :password_confirmation, :avatar, :moderator + #attr_accessible :bio, :email, :firstname, :name, :password, :password_confirmation, :avatar, :moderator has_secure_password validates_presence_of :password, :on => :create - validates_presence_of :email, :presence => true, :uniqueness => true + validates :email, :presence => true, :uniqueness => true, :format => /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i + validates :name, :presence => true + validates :firstname, :presence => true mount_uploader :avatar, AvatarUploader @@ -11,4 +13,26 @@ class ForumUser < ActiveRecord::Base has_many :topics, :class_name => "ForumTopic" has_many :images, :class_name => "ForumUserImage", :order => "created_at DESC" + belongs_to :sheet + before_validation do + if sheet_number? + @sheet = Sheet.where(:sheet_number => sheet_number).first + if !@sheet + errors.add :sheet_number, "Votre numéro adhérent n'est pas valide." + + else + self.sheet_id = @sheet.id + + if @sheet.last_year < Date.today.year + errors.add :sheet_number, "Votre cotisation n'est pas à jour, merci de nous contacter." + end + + + + end + + else + errors.add :sheet_number, "Vous devez saisir votre numéro adhérent (présent en bas de chaque mails)." + end + end end diff --git a/app/models/forum_user_image.rb b/app/models/forum_user_image.rb index 2446e66..1b6d317 100644 --- a/app/models/forum_user_image.rb +++ b/app/models/forum_user_image.rb @@ -4,7 +4,7 @@ class ForumUserImage < ActiveRecord::Base attr_accessor :original_imagename - attr_accessible :description, :image, :title, :views, :original_imagename + #attr_accessible :description, :image, :title, :views, :original_imagename mount_uploader :image, UserImageUploader diff --git a/app/models/newsgroup.rb b/app/models/newsgroup.rb index c8553a4..821f5c3 100644 --- a/app/models/newsgroup.rb +++ b/app/models/newsgroup.rb @@ -3,5 +3,5 @@ class Newsgroup < ActiveRecord::Base has_many :people_newsgroups has_many :people, :through => :people_newsgroups validates_presence_of :name - attr_accessible :name, :description + #attr_accessible :name, :description end diff --git a/app/models/newsletter.rb b/app/models/newsletter.rb index e3d3328..da2661c 100755 --- a/app/models/newsletter.rb +++ b/app/models/newsletter.rb @@ -3,7 +3,7 @@ class Newsletter < ActiveRecord::Base validates_presence_of :title - attr_accessible :title, :content, :email_from + #attr_accessible :title, :content, :email_from #EMAIL_FROMS=["Le Pic Vert ", "Le Pic Vert "] diff --git a/app/models/note.rb b/app/models/note.rb index 707ae53..97e5856 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -3,5 +3,5 @@ class Note < ActiveRecord::Base belongs_to :admin belongs_to :topic has_many :note_files - attr_accessible :message, :subject, :topic, :topic_id + #attr_accessible :message, :subject, :topic, :topic_id end diff --git a/app/models/note_file.rb b/app/models/note_file.rb index b32153b..41beec1 100644 --- a/app/models/note_file.rb +++ b/app/models/note_file.rb @@ -2,7 +2,7 @@ class NoteFile < ActiveRecord::Base attr_accessor :original_filename - attr_accessible :description, :file, :name, :slug, :note, :note_id, :file_cache, :original_filename + #attr_accessible :description, :file, :name, :slug, :note, :note_id, :file_cache, :original_filename belongs_to :note mount_uploader :file, FileUploader diff --git a/app/models/person.rb b/app/models/person.rb index a54e57e..e20240b 100644 --- a/app/models/person.rb +++ b/app/models/person.rb @@ -5,7 +5,7 @@ class Person < ActiveRecord::Base has_many :people_newsgroups has_many :newsgroups, :through => :people_newsgroups - attr_accessible :newsgroup_ids, :newsletter, :surname, :firstname, :email, :phone, :job + #attr_accessible :newsgroup_ids, :newsletter, :surname, :firstname, :email, :phone, :job validates :surname, :presence => true validates :firstname, :presence => true diff --git a/app/models/petition.rb b/app/models/petition.rb index c702469..59e4e4b 100644 --- a/app/models/petition.rb +++ b/app/models/petition.rb @@ -1,5 +1,5 @@ class Petition < ActiveRecord::Base - attr_accessible :description, :enabled, :name, :slug + #attr_accessible :description, :enabled, :name, :slug has_many :signators, :class_name => "PetitionSignator" diff --git a/app/models/petition_signator.rb b/app/models/petition_signator.rb index 92133c2..f313457 100644 --- a/app/models/petition_signator.rb +++ b/app/models/petition_signator.rb @@ -1,7 +1,7 @@ class PetitionSignator < ActiveRecord::Base belongs_to :petition attr_accessor :email_confirmation - attr_accessible :address, :address2, :city, :enabled, :token, :country, :cp, :email, :email_confirmation, :firstname, :name, :petition_id + #attr_accessible :address, :address2, :city, :enabled, :token, :country, :cp, :email, :email_confirmation, :firstname, :name, :petition_id validates :email, :presence => true, :confirmation => true, :uniqueness => { :scope => :petition_id } diff --git a/app/models/question_set.rb b/app/models/question_set.rb index 3b637f6..c578874 100644 --- a/app/models/question_set.rb +++ b/app/models/question_set.rb @@ -2,7 +2,7 @@ class QuestionSet < ActiveRecord::Base belongs_to :survey_item belongs_to :survey_set - attr_accessible :answer_sets_attributes, :survey_item, :survey_item_id, :boolean_content, :content + #attr_accessible :answer_sets_attributes, :survey_item, :survey_item_id, :boolean_content, :content has_many :answer_sets accepts_nested_attributes_for :answer_sets diff --git a/app/models/sheet.rb b/app/models/sheet.rb index 1ca4237..3e56d2f 100644 --- a/app/models/sheet.rb +++ b/app/models/sheet.rb @@ -15,7 +15,7 @@ class Sheet < ActiveRecord::Base - attr_accessible :donates_attributes, :sheet_type, :people_attributes, :sheet_years_attributes, :corporate, :address, :address2, :address3, :pc, :city, :country, :skills, :other_mail, :other_phone + #attr_accessible :donates_attributes, :sheet_type, :people_attributes, :sheet_years_attributes, :corporate, :address, :address2, :address3, :pc, :city, :country, :skills, :other_mail, :other_phone accepts_nested_attributes_for :people, :allow_destroy => true accepts_nested_attributes_for :sheet_years, :allow_destroy => true @@ -30,7 +30,7 @@ class Sheet < ActiveRecord::Base end def generate_sheet_number - self.sheet_number = ("%04d" % self.id) + self.sheet_number = ("%04d" % self.id)+("%04d" % SecureRandom.random_number(99)) end diff --git a/app/models/sheet_year.rb b/app/models/sheet_year.rb index a0a82d4..3393866 100644 --- a/app/models/sheet_year.rb +++ b/app/models/sheet_year.rb @@ -4,7 +4,7 @@ class SheetYear < ActiveRecord::Base validates_presence_of :year - attr_accessible :year, :join_type, :benefactor, :gift_year, :paid_at, :amount, :payment_type, :bank, :check_number, :sheet_id, :plume + #attr_accessible :year, :join_type, :benefactor, :gift_year, :paid_at, :amount, :payment_type, :bank, :check_number, :sheet_id, :plume JOIN_TYPE = {1 => "Individuel", 2 => "Familial", 3 =>"Association"} PAYMENT_TYPE = {1 => "Chèque", 2 => "Liquide"} diff --git a/app/models/survey_item.rb b/app/models/survey_item.rb index d034ea2..e84b0fa 100644 --- a/app/models/survey_item.rb +++ b/app/models/survey_item.rb @@ -1,7 +1,7 @@ # -*- encoding : utf-8 -*- class SurveyItem < ActiveRecord::Base belongs_to :survey_type - attr_accessible :description, :display_type, :help, :item_type, :questions_type, :string_type, :title, :archived, :locked, :text_presentation, :max_checkboxes + #attr_accessible :description, :display_type, :help, :item_type, :questions_type, :string_type, :title, :archived, :locked, :text_presentation, :max_checkboxes ITEM_TYPES = ["question", "note"] QUESTIONS_TYPES = ["boolean", "string", "check_box", "radio", "order"] diff --git a/app/models/survey_item_answer.rb b/app/models/survey_item_answer.rb index 747896f..0876b5e 100644 --- a/app/models/survey_item_answer.rb +++ b/app/models/survey_item_answer.rb @@ -1,7 +1,7 @@ # -*- encoding : utf-8 -*- class SurveyItemAnswer < ActiveRecord::Base belongs_to :survey_item - attr_accessible :class_text, :data_type, :field_type, :help_text, :label_text, :archived, :locked + #attr_accessible :class_text, :data_type, :field_type, :help_text, :label_text, :archived, :locked has_many :answer_sets FIELD_TYPES=["normal", "other", "other_large"] DATA_TYPE = ["integer", "string", "date"] diff --git a/app/models/survey_set.rb b/app/models/survey_set.rb index 0e237fa..10aef15 100644 --- a/app/models/survey_set.rb +++ b/app/models/survey_set.rb @@ -2,7 +2,7 @@ class SurveySet < ActiveRecord::Base belongs_to :survey_type has_many :question_sets - attr_accessible :survey_type_id, :question_sets_attributes, :answer_sets + #attr_accessible :survey_type_id, :question_sets_attributes, :answer_sets accepts_nested_attributes_for :question_sets end diff --git a/app/models/survey_type.rb b/app/models/survey_type.rb index 2d0564a..ea6ac3b 100644 --- a/app/models/survey_type.rb +++ b/app/models/survey_type.rb @@ -1,6 +1,6 @@ # -*- encoding : utf-8 -*- class SurveyType < ActiveRecord::Base - attr_accessible :description, :intro_text, :name, :thank_text, :locked, :archived, :slug + #attr_accessible :description, :intro_text, :name, :thank_text, :locked, :archived, :slug has_many :items, :class_name => "SurveyItem", :dependent => :destroy has_many :survey_sets diff --git a/app/models/tiny_url.rb b/app/models/tiny_url.rb index 0072c7e..77b5075 100644 --- a/app/models/tiny_url.rb +++ b/app/models/tiny_url.rb @@ -1,4 +1,4 @@ # -*- encoding : utf-8 -*- class TinyUrl < ActiveRecord::Base - attr_accessible :nbr_views, :slug, :start_at, :stop_at, :url + #attr_accessible :nbr_views, :slug, :start_at, :stop_at, :url end diff --git a/app/models/topic.rb b/app/models/topic.rb index 04d1885..63e9216 100644 --- a/app/models/topic.rb +++ b/app/models/topic.rb @@ -1,7 +1,7 @@ # -*- encoding : utf-8 -*- class Topic < ActiveRecord::Base belongs_to :admin - attr_accessible :description, :title + #attr_accessible :description, :title validates :title, :presence => true has_many :notes end diff --git a/app/uploaders/user_image_uploader.rb b/app/uploaders/user_image_uploader.rb index 977f244..38699fb 100644 --- a/app/uploaders/user_image_uploader.rb +++ b/app/uploaders/user_image_uploader.rb @@ -35,7 +35,7 @@ class UserImageUploader < CarrierWave::Uploader::Base # Create different versions of your uploaded files: version :large do - process :resize_to_limit => [800, 800] + process :resize_to_limit => [1024, 1024] end diff --git a/app/views/admin/donates/_form.html.haml b/app/views/admin/donates/_form.html.haml index 3e1b5ad..7f1b382 100644 --- a/app/views/admin/donates/_form.html.haml +++ b/app/views/admin/donates/_form.html.haml @@ -20,5 +20,5 @@ = form.label :check_number, "Numéro du chèque : " = form.text_field :check_number - = link_to_remove_fields i(:x_alt), form + = link_to_remove_fields i(:"trash-o"), form diff --git a/app/views/admin/newsgroups/index.html.haml b/app/views/admin/newsgroups/index.html.haml index 74d9e3b..6c772d3 100644 --- a/app/views/admin/newsgroups/index.html.haml +++ b/app/views/admin/newsgroups/index.html.haml @@ -19,7 +19,7 @@ %td.link-column - =link_to(i(:trash), [:admin, newsgroup], :confirm => 'Êtes-vous sure de supprimer le groupe ?', :method => :delete, :class => "lien") if has_permission?('adherent.delete') + =link_to(i(:"trash-o"), [:admin, newsgroup], :confirm => 'Êtes-vous sure de supprimer le groupe ?', :method => :delete, :class => "lien") if has_permission?('adherent.delete') =link_to( i(:pencil), edit_admin_newsgroup_path(newsgroup)) if has_permission?('adherent.edit') diff --git a/app/views/admin/newsletters/_form.haml b/app/views/admin/newsletters/_form.haml index 3fe480d..b574dbf 100755 --- a/app/views/admin/newsletters/_form.haml +++ b/app/views/admin/newsletters/_form.haml @@ -11,7 +11,7 @@ - + %p pour ajouter le lien d'inscription pour le forum avec le numéro adhérent ajouter : [lien_inscription_forum] %p =f.text_area :content, :class => "redactor_content", :style => "height:600px;width:100%;max-width:100%" diff --git a/app/views/admin/newsletters/index.html.haml b/app/views/admin/newsletters/index.html.haml index 46dcd99..f618ccb 100755 --- a/app/views/admin/newsletters/index.html.haml +++ b/app/views/admin/newsletters/index.html.haml @@ -32,10 +32,10 @@ = submit_tag "Envoyer un email de test", :class => "btn" %td{:style => "width:150px;text-align:right;"} - = link_to i(:trash), [:admin, u], :method => :delete, :confirm => 'Voulez-vous vraiment supprimer cette newsletter ?' - = link_to i(:"envelope-alt"), select_recipients_admin_newsletter_path(u) + = link_to i(:"trash-o"), [:admin, u], :method => :delete, :confirm => 'Voulez-vous vraiment supprimer cette newsletter ?' + = link_to i(:"envelope-o"), select_recipients_admin_newsletter_path(u) = link_to i(:pencil), edit_admin_newsletter_path(u) - = link_to i(:"eye-open"), admin_newsletter_path(u), :target => "_blank" + = link_to i(:"eye"), admin_newsletter_path(u), :target => "_blank" diff --git a/app/views/admin/newsletters/select_recipients.html.haml b/app/views/admin/newsletters/select_recipients.html.haml index 03b9dbe..4627c1a 100644 --- a/app/views/admin/newsletters/select_recipients.html.haml +++ b/app/views/admin/newsletters/select_recipients.html.haml @@ -2,7 +2,7 @@ %h1 Envoyer une newsletter %p - = link_to i(:"eye-open"), admin_newsletter_path(@newsletter), :target => "_blank" + = link_to i(:"eye"), admin_newsletter_path(@newsletter), :target => "_blank" Newsletter sélectionnée : =@newsletter.title diff --git a/app/views/admin/people/_form.html.haml b/app/views/admin/people/_form.html.haml index 2833a12..e1c125c 100644 --- a/app/views/admin/people/_form.html.haml +++ b/app/views/admin/people/_form.html.haml @@ -14,7 +14,7 @@ %td=form.label :job, "Job" %td.del{:rowspan => 2} - = link_to_remove_fields i(:trash), form + = link_to_remove_fields i(:"trash-o"), form %tr %td=form.check_box :newsletter, :place_holder => "Newsletter" %td=form.text_field :surname, :place_holder => "Nom", :style => ("border-color:red;" if form.object.errors.include?(:surname)) diff --git a/app/views/admin/petitions/index.html.haml b/app/views/admin/petitions/index.html.haml index a5bb3d4..5279931 100644 --- a/app/views/admin/petitions/index.html.haml +++ b/app/views/admin/petitions/index.html.haml @@ -19,7 +19,7 @@ =petition.confirmed_signators_number ="("+(petition.signators_number-petition.confirmed_signators_number).to_s+" en attente)" if petition.signators_number-petition.confirmed_signators_number > 0 %td - = link_to i(:trash), [:admin, petition], method: :delete, data: { confirm: 'Voulez-vous vraiment supprimer cette petition ? Les signatures seront également supprimées.' } + = link_to i(:"trash-o"), [:admin, petition], method: :delete, data: { confirm: 'Voulez-vous vraiment supprimer cette petition ? Les signatures seront également supprimées.' } = link_to i(:pencil), edit_admin_petition_path(petition) = link_to i(:info), [:admin, petition] diff --git a/app/views/admin/petitions/new.html.haml b/app/views/admin/petitions/new.html.haml index 2f807c2..04028d2 100644 --- a/app/views/admin/petitions/new.html.haml +++ b/app/views/admin/petitions/new.html.haml @@ -1,6 +1,4 @@ -%h1 Ajouter une url +%h1 Ajouter une pétition = render 'form' -= link_to 'Back', tiny_urls_path - diff --git a/app/views/admin/sheet_years/_form.html.haml b/app/views/admin/sheet_years/_form.html.haml index 1f43641..0d353d2 100644 --- a/app/views/admin/sheet_years/_form.html.haml +++ b/app/views/admin/sheet_years/_form.html.haml @@ -42,5 +42,5 @@ = form.hidden_field :sheet_id - = link_to_remove_fields i(:trash), form + = link_to_remove_fields i(:"trash-o"), form diff --git a/app/views/admin/sheets/_sheet.html.haml b/app/views/admin/sheets/_sheet.html.haml index f892a7b..4951526 100644 --- a/app/views/admin/sheets/_sheet.html.haml +++ b/app/views/admin/sheets/_sheet.html.haml @@ -23,6 +23,6 @@ %td.hidden-phone =sheet.city %td.link-column - =link_to i(:trash), [:admin, sheet], :method => :delete, :confirm => "*********ATTENTION*********\n Supprimer cette fiche entrainera la suppression de toutes traces concernant celle-ci : y compris les traces d'années d'adhésion, pouvant donc fausser les statistiques de l'ensemble du fichier. \n \nVous pouvez convertir la fiche en fiche 'sympathisant'.\n\n\ Pour annuler cliquez sur 'annuler', pour supprimer cette fiche malgrès cet avertissement cliquez sur 'OK'. \n\n", :class => "lien" + =link_to i(:"trash-o"), [:admin, sheet], :method => :delete, :confirm => "*********ATTENTION*********\n Supprimer cette fiche entrainera la suppression de toutes traces concernant celle-ci : y compris les traces d'années d'adhésion, pouvant donc fausser les statistiques de l'ensemble du fichier. \n \nVous pouvez convertir la fiche en fiche 'sympathisant'.\n\n\ Pour annuler cliquez sur 'annuler', pour supprimer cette fiche malgrès cet avertissement cliquez sur 'OK'. \n\n", :class => "lien" =link_to i(:info), [:admin, sheet], :class => "lien", :remote => true =link_to i(:pencil), edit_admin_sheet_path(sheet), :method => :get, :remote => true \ No newline at end of file diff --git a/app/views/admin/sheets/edit.html.haml b/app/views/admin/sheets/edit.html.haml index 9869397..b5e92a2 100644 --- a/app/views/admin/sheets/edit.html.haml +++ b/app/views/admin/sheets/edit.html.haml @@ -1,7 +1,7 @@ #sheet_show.edit .links =link_to i(:info), [:admin, @sheet], :class => "button", :remote => true, :confirm => "Attention, les changements éventuellements apportés ne seront pas sauvegardés." - = link_to i(:remove), "#",:class => "button", :onclick => "$('#sheet_show').remove();$('body').css('overflow', 'auto');return false;" + = link_to i(:times), "#",:class => "button", :onclick => "$('#sheet_show').remove();$('body').css('overflow', 'auto');return false;" %input{:type => "submit", :onclick => "$(this).closest('#sheet_show').find('form').submit();return false;", :value => "Sauvegarder", :class => "btn"} .content diff --git a/app/views/admin/sheets/index.html.haml b/app/views/admin/sheets/index.html.haml index 41bc5f5..7951640 100644 --- a/app/views/admin/sheets/index.html.haml +++ b/app/views/admin/sheets/index.html.haml @@ -3,25 +3,25 @@ -y = last_year #stat_years - =link_to "fiches", admin_sheets_path() - | Stats : - - -while y >= first_year + =link_to "fiches", admin_sheets_path() + | Stats : + + -while y >= first_year - =link_to y, {:controller => :sheets, :action => :stats, :year => y}, :class => ("now" if y == params[:year].to_i) - - -y -= 1 - %br - %br + =link_to y, {:controller => :sheets, :action => :stats, :year => y}, :class => ("now" if y == params[:year].to_i) + + -y -= 1 + %br + %br %h1 Liste des fiches =render :partial => "sheets_search", :locals => {:url => ""} -%br +%br = link_to 'Ajouter une fiche', new_admin_sheet_path, :remote => true, :class => "btn" %br %br #sheets - =render :partial => "sheets" + =render :partial => "sheets" =link_to "Exporter au format XLS", admin_sheets_path(:format => :xls), :class => "btn" %br %br diff --git a/app/views/admin/sheets/show.html.haml b/app/views/admin/sheets/show.html.haml index 3626e58..e9a4207 100644 --- a/app/views/admin/sheets/show.html.haml +++ b/app/views/admin/sheets/show.html.haml @@ -1,7 +1,7 @@ #sheet_show.show .links = link_to i(:pencil), edit_admin_sheet_path(@sheet), :class => "button", :method => :get, :remote => true - = link_to i(:remove), "#", :class => "button", :onclick => "$('#sheet_show').remove();$('body').css('overflow', 'auto');return false;" + = link_to i(:times), "#", :class => "button", :onclick => "$('#sheet_show').remove();$('body').css('overflow', 'auto');return false;" diff --git a/app/views/admin/survey_types/_survey.html.haml b/app/views/admin/survey_types/_survey.html.haml index 52fa176..4d9949e 100644 --- a/app/views/admin/survey_types/_survey.html.haml +++ b/app/views/admin/survey_types/_survey.html.haml @@ -3,5 +3,5 @@ %td=new_survey_set_path(:slug => survey.slug) %td - =link_to i(:"eye-open"), new_survey_set_path(:slug => survey.slug) - =link_to i(:"bar-chart"), [:admin, survey] \ No newline at end of file + =link_to i(:"eye"), new_survey_set_path(:slug => survey.slug) + =link_to i(:"bar-chart-o"), [:admin, survey] \ No newline at end of file diff --git a/app/views/admin/tiny_urls/index.html.haml b/app/views/admin/tiny_urls/index.html.haml index 350a18b..b1bc917 100644 --- a/app/views/admin/tiny_urls/index.html.haml +++ b/app/views/admin/tiny_urls/index.html.haml @@ -15,6 +15,6 @@ %td= tiny_url.url %td= tiny_url.nbr_views %td - = link_to i(:trash), [:admin, tiny_url], method: :delete, data: { confirm: 'Voulez-vous vraiment supprimer cette url ? Le lien deviendra mort.' } + = link_to i(:"trash-o"), [:admin, tiny_url], method: :delete, data: { confirm: 'Voulez-vous vraiment supprimer cette url ? Le lien deviendra mort.' } = link_to i(:pencil), edit_admin_tiny_url_path(tiny_url) diff --git a/app/views/admins/passwords/edit.html.haml b/app/views/admins/passwords/edit.html.haml index 0cbfd4e..9278879 100644 --- a/app/views/admins/passwords/edit.html.haml +++ b/app/views/admins/passwords/edit.html.haml @@ -14,5 +14,5 @@ %br/ = f.password_field :password_confirmation %p - %button{:type => "submit"} Changer mon mot de passe + %button.btn{:type => "submit"} Changer mon mot de passe %p= link_to "Se connecter", new_session_path(resource_name) diff --git a/app/views/admins/passwords/new.html.haml b/app/views/admins/passwords/new.html.haml index 383ac01..41d6828 100644 --- a/app/views/admins/passwords/new.html.haml +++ b/app/views/admins/passwords/new.html.haml @@ -6,6 +6,6 @@ = f.label :email, "Email :" %br/ = f.text_field :email - %button{:type => "submot"} Recevoir les instructions pour changer de mot de passe. + %button.btn{:type => "submit"} Recevoir les instructions pour changer de mot de passe. %p= link_to "Se connecter", new_session_path(resource_name) diff --git a/app/views/admins/sessions/new.html.haml b/app/views/admins/sessions/new.html.haml index e39b2cd..a01632e 100644 --- a/app/views/admins/sessions/new.html.haml +++ b/app/views/admins/sessions/new.html.haml @@ -1,21 +1,20 @@ --content_for :title do - %h1 Espace d'administration + + + = form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| - %p - = f.label :username, "Login:" - %br/ - = f.text_field :username - - %p - = f.label :password, "Mot de passe :" - %br/ - = f.password_field :password - - %p - = f.check_box :remember_me - = f.label :remember_me, "Se rappeler de moi (connexion automatique)" + %h2.form-signin-heading Se connecter + + = f.text_field :username, :placeholder => "email ou login" + = f.password_field :password, :placeholder => "mot de passe" + - %button{:type => "submit"} Connexion + %p + = f.check_box :remember_me + = f.label :remember_me, "Se rappeler de moi ?" + + + %p= submit_tag "Se connecter", :class => "btn btn-large btn-primary" + + %p= link_to "Mot de passe oublié ?", new_password_path(resource_name) -%p= link_to "Mot de passe perdu ?", new_password_path(resource_name) diff --git a/app/views/forum/auths/new.haml b/app/views/forum/auths/new.haml index 51d1515..7b26a97 100644 --- a/app/views/forum/auths/new.haml +++ b/app/views/forum/auths/new.haml @@ -1,12 +1,18 @@ -%h1 Login +=image_tag("logo.png", :style => "width:200px;display:block;margin:auto;margin-bottom:2em;") + +%h1 Se connecter = form_tag forum_auths_path do - %p - = label_tag :email - = text_field_tag :email, params[:email] - %p - = label_tag :password - = password_field_tag :password + %p + = label_tag :email, "email :" + = text_field_tag :email, params[:email] + %p + = label_tag :password, "Mot de passe :" + = password_field_tag :password - %p= submit_tag "Log In" - \ No newline at end of file + %p= submit_tag "Se connecter", :class => "btn btn-primary" + + %p + Pas encore inscrit ? + =link_to "M'inscrire.", new_forum_forum_user_path + \ No newline at end of file diff --git a/app/views/forum/forum_categories/_form.haml b/app/views/forum/forum_categories/_form.haml index 8c68d58..21df5c2 100644 --- a/app/views/forum/forum_categories/_form.haml +++ b/app/views/forum/forum_categories/_form.haml @@ -6,6 +6,6 @@ - =f.submit "Sauvegarder" + =f.submit "Sauvegarder", :class => "btn btn-primay" \ No newline at end of file diff --git a/app/views/forum/forum_categories/show.haml b/app/views/forum/forum_categories/show.haml deleted file mode 100644 index 2a2459f..0000000 --- a/app/views/forum/forum_categories/show.haml +++ /dev/null @@ -1,17 +0,0 @@ -=link_to "forum "+@category.forum.title, forum_forum_path(@category.forum) -> -= @category.title -=link_to "Nouveau topic", new_forum_forum_topic_path(:category_id => @category.id), :class => "button", :style => "margin:1em 0em;float:right" - -%h1= @category.title - -%table - %tr - %th Titre - %th Réponses - %th Démaré par - %th le - %th dernier message - -if moderator? - %th Actions - =render @category.forum_topics diff --git a/app/views/forum/forum_messages/_form.haml b/app/views/forum/forum_messages/_form.haml index 903776c..452d103 100644 --- a/app/views/forum/forum_messages/_form.haml +++ b/app/views/forum/forum_messages/_form.haml @@ -1,16 +1,58 @@ -.message_form - .form - = form_for [:forum, @message] do |f| - %h3 Contenu du message - =f.submit "Sauvegarder" - - =f.hidden_field :forum_topic_id - =f.hidden_field :forum_user_id - =f.text_area :description, :class => "markdown" - %p{:style => "height:400px;"} - =f.submit "Sauvegarder" - +#message_form + .form + + %h3 Contenu du message + + + =f.hidden_field :forum_topic_id + =f.hidden_field :forum_user_id + + %br + %br + + + .forum_message - - =render :partial => "forum/forum_user_images/images_form" - \ No newline at end of file + + .left + + .user + =image_tag((current_fuser.avatar? ? current_fuser.avatar.square.url : ""), :class => "avatar" ) + %br + =current_fuser.firstname+" "+current_fuser.name + + .date=l @message.created_at, :format => :human if @message and @message.created_at + + .right{:style => "padding:0px;"} + .content{:style => "border:0px;padding:2% !important;min-height:200px;background:transparent !important;"} + =raw f.object.description + =f.text_area :description, :id => "redactor_content", :style => "display:none;" + + .fix-submit + =f.submit "Sauvegarder", :class => "btn btn-primary" + + + + :javascript + $("#message_form").closest("form").submit(function (e){ + + $("textarea").val($('#message_form .content').html()); + $("#toolbar-text").html(""); + + }); + + + + $('#message_form .content').redactor({ + toolbarExternal: '#toolbar-text', + lang: 'fr', + buttons : ['undo','redo','|', 'formatting', '|', 'bold', 'italic', 'deleted','underline','|', 'alignleft', 'aligncenter', 'alignright', 'justify', '|', 'unorderedlist', 'orderedlist', 'outdent', 'indent', '|', 'table', 'link', '|','fontcolor', 'backcolor','|', 'horizontalrule', '|','html'] + + + + }); + + + + + \ No newline at end of file diff --git a/app/views/forum/forum_messages/_forum_message.haml b/app/views/forum/forum_messages/_forum_message.haml index 84dc069..0ce18b3 100644 --- a/app/views/forum/forum_messages/_forum_message.haml +++ b/app/views/forum/forum_messages/_forum_message.haml @@ -1,31 +1,33 @@ .forum_message#forum_message{:id => forum_message.id} - - - .left - - .user - -if forum_message.forum_user - - =image_tag (forum_message.forum_user.avatar? ? forum_message.forum_user.avatar.square.url : ""), :class => "avatar" - - =forum_message.forum_user.firstname - =forum_message.forum_user.name - -else - utilisateur supprimé - .date=l forum_message.created_at, :format => :short - .right - .links - =link_to "modifier", edit_forum_forum_message_path(forum_message) - =link_to "supprimer", [:forum, forum_message], :confirm => "Supprimer ce message ?", :method => :delete - - =markdown forum_message.description - - - :javascript - $('.forum_message .right img').each(function(){ - $(this).closest("p").css("width", "100%"); - $(this).closest("p").css("max-width", "100%"); - - }); - - \ No newline at end of file + + + .left + + .user + -if forum_message.forum_user + + =link_to image_tag((forum_message.forum_user.avatar? ? forum_message.forum_user.avatar.square.url : ""), :class => "avatar" ), [:forum, forum_message.forum_user] + %br + + =link_to forum_message.forum_user.firstname+" "+forum_message.forum_user.name, [:forum, forum_message.forum_user] + -else + utilisateur supprimé + .date + =l forum_message.created_at, :format => "%d %B %Y" + %br + =l forum_message.created_at, :format => "%Hh%M" + + .right + .links + =link_to i(:pencil), edit_forum_forum_message_path(forum_message) if forum_message.forum_user == current_fuser or moderator? + =link_to i(:"trash-o"), [:forum, forum_message], :confirm => "Supprimer ce message ?", :method => :delete if moderator? + + .content=markdown forum_message.description + + -if forum_message.updated_at != forum_message.created_at + %p.edited.alert + Ce message a été modifié + =l forum_message.created_at, :format => :human + .clear + + \ No newline at end of file diff --git a/app/views/forum/forum_messages/edit.haml b/app/views/forum/forum_messages/edit.haml index 038bb12..0e463d9 100644 --- a/app/views/forum/forum_messages/edit.haml +++ b/app/views/forum/forum_messages/edit.haml @@ -1 +1,5 @@ -=render :partial => "form" \ No newline at end of file +%br +%br += form_for [:forum, @message] do |f| + =render :partial => "form", :locals => {:f => f} +=render :partial => "forum/forum_user_images/images_form" \ No newline at end of file diff --git a/app/views/forum/forum_messages/new.haml b/app/views/forum/forum_messages/new.haml index 038bb12..65ad145 100644 --- a/app/views/forum/forum_messages/new.haml +++ b/app/views/forum/forum_messages/new.haml @@ -1 +1,6 @@ -=render :partial => "form" \ No newline at end of file +%br +%br + += form_for [:forum, @message] do |f| + =render :partial => "form", :locals => {:f => f} +=render :partial => "forum/forum_user_images/images_form" \ No newline at end of file diff --git a/app/views/forum/forum_topics/_form.haml b/app/views/forum/forum_topics/_form.haml index adcdc95..dd60de5 100644 --- a/app/views/forum/forum_topics/_form.haml +++ b/app/views/forum/forum_topics/_form.haml @@ -1,34 +1,20 @@ -.message_form - = form_for [:forum, @topic] do |f| - - %p - = f.label :title, "Titre : ", :style => "width:8%;display:inline-block;" - = f.text_field :title, :style => "width:90%;" - - .form - %h3 Contenu du message - - - = f.hidden_field :category_id - - =f.fields_for :forum_messages do |f| - - =f.hidden_field :forum_user_id - =f.text_area :description, :class => "markdown" - %div{:style => "height:402px;"} - - - - =f.submit "Sauvegarder" - - - - - - =render :partial => "forum/forum_user_images/images_form" - +%br +%br +%h1 Créer un nouveau fil de discussion += semantic_form_for [:forum, @topic] do |f| + =f.inputs do + =f.input :category, :label => "Catégorie", :include_blank => false + %p + = f.label :title, "Titre : ", :style => "width:8%;display:inline-block;" + = f.text_field :title, :style => "width:90%;" + + + + + =f.fields_for :forum_messages do |f| + =render :partial => "forum/forum_messages/form", :locals => {:f => f} + + - - \ No newline at end of file diff --git a/app/views/forum/forum_topics/_forum_topic.haml b/app/views/forum/forum_topics/_forum_topic.haml index ad80ec5..31ed234 100644 --- a/app/views/forum/forum_topics/_forum_topic.haml +++ b/app/views/forum/forum_topics/_forum_topic.haml @@ -1,15 +1,22 @@ %tr.topic - %td=link_to forum_topic.title, [:forum, forum_topic] - %td=forum_topic.forum_messages.count - 1 - %td= forum_topic.username - %td=l forum_topic.created_at - - %td - =l forum_topic.forum_messages.last.created_at - par - =forum_topic.forum_messages.last.username - -if moderator? - %td - =link_to "supprimer", [:forum, forum_topic], :confirm => "Supprimer ce topic ?", :method => :delete - =link_to forum_topic.title, [:forum, forum_topic] - \ No newline at end of file + %td=link_to forum_topic.title, [:forum, forum_topic] + %td{:style => "width:160px;"}=forum_topic.category.title if forum_topic.category + %td{:style => "width:100px;"}=forum_topic.forum_messages.count - 1 + %td{:style => "width:160px;"} + = forum_topic.username + %br + il y a + =distance_of_time_in_words Time.now, forum_topic.created_at + + + %td{:style => "width:160px;"} + -if forum_topic.forum_messages.count > 1 + =forum_topic.forum_messages.last.username + %br + il y a + =distance_of_time_in_words Time.now, forum_topic.forum_messages.last.created_at + + -if moderator? + %td + =link_to i(:"trash-o"), [:forum, forum_topic], :confirm => "Supprimer ce topic ?", :method => :delete + \ No newline at end of file diff --git a/app/views/forum/forum_topics/index.haml b/app/views/forum/forum_topics/index.haml new file mode 100644 index 0000000..c6fe737 --- /dev/null +++ b/app/views/forum/forum_topics/index.haml @@ -0,0 +1,16 @@ +=link_to "Lancer un fil de discussion", new_forum_forum_topic_path, :class => "btn btn-primary", :style => "margin:1em 0em;float:right" + + +%table.table.table-striped.table-hover + %tr.transparent + %th Fil de discussion + %th{:style => "width:150px;"} Catégorie + %th Réponses + %th Lancé + %th Activité + -if moderator? + %th{:style => "width:50px;"} + =render @forum_topics + + +=link_to "Lancer un fil de discussion", new_forum_forum_topic_path, :class => "btn btn-primary", :style => "margin:1em 0em;float:right" \ No newline at end of file diff --git a/app/views/forum/forum_topics/new.haml b/app/views/forum/forum_topics/new.haml index 038bb12..bc17697 100644 --- a/app/views/forum/forum_topics/new.haml +++ b/app/views/forum/forum_topics/new.haml @@ -1 +1,2 @@ -=render :partial => "form" \ No newline at end of file +=render :partial => "form" +=render :partial => "forum/forum_user_images/images_form" \ No newline at end of file diff --git a/app/views/forum/forum_topics/show.haml b/app/views/forum/forum_topics/show.haml index c371550..e506363 100644 --- a/app/views/forum/forum_topics/show.haml +++ b/app/views/forum/forum_topics/show.haml @@ -1,10 +1,14 @@ -=link_to "forum "+@topic.category.forum.title, forum_forum_path(@topic.category.forum) -> -=link_to @topic.category.title, [:forum, @topic.category] -> -=link_to "ajouter un message", new_forum_forum_message_path(:topic_id => @topic.id), :class => "button", :style => "margin:1em 0em;float:right" + +=link_to "ajouter un message", new_forum_forum_message_path(:topic_id => @topic.id), :class => "btn btn-primary", :style => "margin:1em 0em;float:right" %h1= @topic.title %br %br =render @topic.forum_messages + +=link_to "ajouter un message", new_forum_forum_message_path(:topic_id => @topic.id), :class => "btn btn-primary", :style => "margin:1em 0em;float:right" + +%br +%br +%br +%br \ No newline at end of file diff --git a/app/views/forum/forum_user_images/_forum_user_image.haml b/app/views/forum/forum_user_images/_forum_user_image.haml index dfd06e3..7dfa878 100644 --- a/app/views/forum/forum_user_images/_forum_user_image.haml +++ b/app/views/forum/forum_user_images/_forum_user_image.haml @@ -1,6 +1,6 @@ - - -#user_image.user_image_block{:id => forum_user_image.id} - =image_tag forum_user_image.image.thumb.url+"?"+forum_user_image.updated_at.to_s, :"data-src" => forum_user_image.id, :class => "user_image" - = link_to i(:rotate, :gray_light, "12x14"), rotate_forum_forum_user_image_path(:id => forum_user_image.id, :manager => params[:manager], :multiple => params[:multiple]), :remote => true - = link_to i(:rotate_right, :gray_light, "12x14"), rotate_forum_forum_user_image_path(:id => forum_user_image.id, :manager => params[:manager], :multiple => params[:multiple], :direction => :right), :remote => true \ No newline at end of file +-if forum_user_image.image? + + #user_image.user_image_block{:id => forum_user_image.id} + =image_tag forum_user_image.image.thumb.url+"?"+forum_user_image.updated_at.to_s, :"data-src" =>forum_user_image.image.large.url, :class => "user_image" + = link_to i(:"rotate-left", :icon => false), rotate_forum_forum_user_image_path(:id => forum_user_image.id, :manager => params[:manager], :multiple => params[:multiple]), :remote => true + = link_to i(:"rotate-right", :icon => false), rotate_forum_forum_user_image_path(:id => forum_user_image.id, :manager => params[:manager], :multiple => params[:multiple], :direction => :right), :remote => true \ No newline at end of file diff --git a/app/views/forum/forum_user_images/_images_form.haml b/app/views/forum/forum_user_images/_images_form.haml index 6a89be1..0595ca6 100644 --- a/app/views/forum/forum_user_images/_images_form.haml +++ b/app/views/forum/forum_user_images/_images_form.haml @@ -1,29 +1,32 @@ .user_images - %h3 Mon album photo - - - - - - - - .images=render current_fuser.images - %form.fileupload{:action => forum_forum_user_images_path(), :enctype => "multipart/form-data", :method => "POST"} - - .upload - .progress - .bar{:style => "height:1em;"} - - %button.add_files ajouter des photos - - %input{:multiple => "", :name => "files[]", :type => "file", :style => "float:right;"} + .toggle-button + .o=i(:"picture-o", :icon => false) + .c=i(:"times", :icon => false) + %h3 Mon album photo + + + + + + + + .images=render current_fuser.images + %form.fileupload{:action => forum_forum_user_images_path(), :enctype => "multipart/form-data", :method => "POST"} + + .upload + .progress + .bar{:style => "height:1em;"} + + %button.add_files{:class => "btn"} ajouter des photos + + %input{:multiple => "", :name => "files[]", :type => "file", :style => "float:right;"} - :javascript - init_user_images(); - + :javascript + init_user_images(); + %p{:style => "clear:both;"} Vous pouvez télécharger de nouvelles images pour les ajouter dans votre message en cliquant sur "ajouter des photos" où en les glissant sur cette zone. %p Vous pouvez ensuite ajouter une image dans votre message en cliquant sur celle que vous souhaitez ajouter. - - - - \ No newline at end of file + + + + \ No newline at end of file diff --git a/app/views/forum/forum_users/_form.haml b/app/views/forum/forum_users/_form.haml index 95e4df4..e73b5d5 100644 --- a/app/views/forum/forum_users/_form.haml +++ b/app/views/forum/forum_users/_form.haml @@ -1,15 +1,17 @@ = semantic_form_for [:forum, @user] do |f| - =f.inputs :name => "Basic" do - = f.input :firstname, :label => "Prénom" - = f.input :name, :label => "Nom" - = f.input :email, :label => "Email" - = f.input :password, :label => "Mot de passe" - = f.input :password_confirmation, :label => "Confirmation" - = f.input :avatar, :label => "Image de profil" - =image_tag(f.object.avatar.square.url) if f.object.avatar - - - - =f.submit "Sauvegarder" - - \ No newline at end of file + =f.inputs do + = f.input :firstname, :label => "Prénom" + = f.input :name, :label => "Nom" + = f.input :bio, :label => "Présentation" + = f.input :email, :label => "Email" + = f.input :password, :label => "Mot de passe" + = f.input :password_confirmation, :label => "Confirmation" + =image_tag(f.object.avatar.square.url, :style => "height:4em;") if f.object.avatar + + = f.input :avatar, :label => "Image de profil" + + + %br + =f.submit "Sauvegarder", :class => "btn btn-primary" + + \ No newline at end of file diff --git a/app/views/forum/forum_users/_forum_user.haml b/app/views/forum/forum_users/_forum_user.haml index 84e54a2..b63b3a7 100644 --- a/app/views/forum/forum_users/_forum_user.haml +++ b/app/views/forum/forum_users/_forum_user.haml @@ -8,5 +8,4 @@ -if moderator? %td - =link_to "voir", edit_forum_forum_user_path(forum_user) - =link_to "supprimer", [:forum, forum_user], :method => :delete, :confirm => "Voulez-vous vraiment supprimer cet utilisateur ?" \ No newline at end of file + =link_to i(:"trash-o"), [:forum, forum_user], :method => :delete, :confirm => "Voulez-vous vraiment supprimer cet utilisateur ?" \ No newline at end of file diff --git a/app/views/forum/forum_users/edit.haml b/app/views/forum/forum_users/edit.haml index 038bb12..fba222e 100644 --- a/app/views/forum/forum_users/edit.haml +++ b/app/views/forum/forum_users/edit.haml @@ -1 +1,2 @@ +%h1 Modifier un compte utilisateur =render :partial => "form" \ No newline at end of file diff --git a/app/views/forum/forum_users/index.haml b/app/views/forum/forum_users/index.haml index dc4833f..f9824cf 100644 --- a/app/views/forum/forum_users/index.haml +++ b/app/views/forum/forum_users/index.haml @@ -1,8 +1,8 @@ -=link_to "nouvel utilisateur", new_forum_forum_user_path, :class => "button", :style => "margin:1em 0em;float:right" +=link_to "nouvel utilisateur", new_forum_forum_user_path, :class => "btn btn-primary", :style => "margin:1em 0em;float:right" if moderator? %h1 Liste des utilisateurs -%table +%table.table.table-hover.table-striped %tr %th{:style => "width:50px;"} %th Nom diff --git a/app/views/forum/forum_users/new.haml b/app/views/forum/forum_users/new.haml index 038bb12..d1aab73 100644 --- a/app/views/forum/forum_users/new.haml +++ b/app/views/forum/forum_users/new.haml @@ -1 +1,16 @@ -=render :partial => "form" \ No newline at end of file +%h1 M'inscrire au forum du Pic Vert + += semantic_form_for [:forum, @user] do |f| + =f.inputs do + = f.input :sheet_number, :label => "Numéro d'adhérent", :input_html => {:readonly => (true if params[:i])} + = f.input :firstname, :label => "Prénom" + = f.input :name, :label => "Nom" + = f.input :email, :label => "Email" + = f.input :password, :label => "Mot de passe" + = f.input :password_confirmation, :label => "Confirmation" + + + %br + =f.submit "Sauvegarder", :class => "btn btn-primary" + + \ No newline at end of file diff --git a/app/views/forum/forum_users/show.haml b/app/views/forum/forum_users/show.haml index 7b47d47..08dab6b 100644 --- a/app/views/forum/forum_users/show.haml +++ b/app/views/forum/forum_users/show.haml @@ -1,7 +1,31 @@ -=image_tag (@user.avatar? ? @user.avatar.square.url : ""), :class => "avatar", :style => "width:100px; border-radius:1em;" -%p - =@user.firstname - =@user.name - -%p - =link_to "modifier", edit_forum_forum_user_path(@user) \ No newline at end of file +.container-fluid + .span3 + =image_tag (@user.avatar? ? @user.avatar.square.url : ""), :class => "avatar", :style => "width:100%; border-radius:50%;" + .clear + %br + .span9 + %h1 + =@user.firstname + =@user.name + =simple_format @user.bio + + %p + =link_to i(:pencil), edit_forum_forum_user_path(@user) if @user == current_fuser or moderator? +.clear + + %h2 + Fils de discussion ouverts par + =@user.firstname + =@user.name + %table.table.table-striped.table-hover + %tr.transparent + %th Fil de discussion + %th{:style => "width:150px;"} Catégorie + %th Réponses + %th Lancé + %th Activité + -if moderator? + %th{:style => "width:50px;"} + + =render @user.topics + diff --git a/app/views/forum/forums/show.html.haml b/app/views/forum/forums/show.html.haml index 4e23074..0f96969 100644 --- a/app/views/forum/forums/show.html.haml +++ b/app/views/forum/forums/show.html.haml @@ -1,4 +1,4 @@ -=link_to "ajouter une catégorie", new_forum_forum_category_path(:forum_id => @forum.id), :class => "button", :style => "margin:1em 0em;float:right" if moderator? +=link_to "ajouter une catégorie", new_forum_forum_category_path(:forum_id => @forum.id), :class => "btn", :style => "margin:1em 0em;float:right" if moderator? %h1=@forum.title .description diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 229327d..1b956e9 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -2,7 +2,7 @@ %html %head %title= @title || "Le Pic Vert." - = stylesheet_link_tag "application", :media => "all" + = stylesheet_link_tag :application, :media => "all" = javascript_include_tag "application" = csrf_meta_tags diff --git a/app/views/layouts/connexion.html.haml b/app/views/layouts/connexion.html.haml index be720d4..3672098 100644 --- a/app/views/layouts/connexion.html.haml +++ b/app/views/layouts/connexion.html.haml @@ -1,43 +1,28 @@ !!! +%html{:lang => "fr"} + %head + %meta{:charset => "utf-8"}/ + %meta{:content => "IE=Edge,chrome=1", "http-equiv" => "X-UA-Compatible"}/ + %meta{:content => "width=device-width, initial-scale=1.0", :name => "viewport"}/ + %title Connection + = csrf_meta_tags + = stylesheet_link_tag :connexion + = javascript_include_tag :connexion + + + %body + -if @forum + :coffeescript + $ -> + $.backstretch("/login_background2.jpg") + + -else + :coffeescript + $ -> + $.backstretch("/login_background.jpg") + #flashs= bootstrap_flash + .form-signin= yield + -%html{:xmlns=>"http://www.w3.org/1999/xhtml", :"xml:lang"=>"fr", :lang=>"fr"} - %head - %meta{:"http-equiv" => "content-type" ,:content =>"text/html;charset=UTF-8" } - %title - Administration - - - - = csrf_meta_tag - - =javascript_include_tag "https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js" - =javascript_include_tag "connexion" - - = stylesheet_link_tag 'connexion' - - - - - - - - %body - #title=yield :title - #main - - - - = yield - #flash - -if flash[:alert] or (@flash_i and @flash_i[:alert]) - .message.closeable.alert - = flash[:alert] - = @flash_i[:alert] if @flash_i and @flash_i[:alert] - -if flash[:notice] - .message.closeable.notice - = flash[:notice] - - - - - + + \ No newline at end of file diff --git a/app/views/layouts/forum.haml b/app/views/layouts/forum.haml index 6676573..baecd2e 100644 --- a/app/views/layouts/forum.haml +++ b/app/views/layouts/forum.haml @@ -1,61 +1,102 @@ !!! +%html{:lang => "en"} + %head + %meta{:charset => "utf-8"}/ + %meta{:content => "IE=Edge,chrome=1", "http-equiv" => "X-UA-Compatible"}/ + %meta{:content => "width=device-width, initial-scale=1.0", :name => "viewport"}/ + %title= @title || "Admin" + + =javascript_include_tag "forum" + =stylesheet_link_tag "forum" + = csrf_meta_tags -%html{:lang => "fr"} - %head - %meta{:"http-equiv" => "content-type" ,:content =>"text/html;charset=UTF-8" } - %title - Forum - - =javascript_include_tag "forum" - =stylesheet_link_tag "forum" - - = csrf_meta_tag - - %style=Pygments.css('.highlight') - - =javascript_include_tag "http://maps.google.com/maps/api/js?sensor=false®ion=FR" - - - - + + =javascript_include_tag "http://maps.google.com/maps/api/js?sensor=false®ion=FR" + + %style=Pygments.css('.highlight') + + + - - - %body + + - +%body.admin + + -if current_fuser + .navbar.navbar-inverse + .navbar-inner{:style => "border-radius:0px;"} + .container + %a.btn.btn-navbar{:data => {:toggle => "collapse", :target => ".nav-collapse"}} + %span.icon-bar + %span.icon-bar + %span.icon-bar + + + + + + %a.brand{:href => "/forum/forum_topics"} + =i(:home, :icon => false) + Forum du Pic Vert + .collapse.nav-collapse + %ul.nav + %li=link_to "Fils de discussion", forum_forum_topics_path + %li=link_to "Utilisateurs", forum_forum_users_path + + + %ul.nav.pull-right - -if current_fuser - %nav#top - =link_to "utilisateurs", forum_forum_users_path - =link_to "forum", forum_forum_path(:id => 1) - - .personnal - =image_tag (current_fuser.avatar? ? current_fuser.avatar.square.url : ""), :class => "avatar" - %span - =current_fuser.firstname - =current_fuser.name - .menu - =link_to "se déconnecter", logout_forum_auths_path, :method => :delete - - - #main= yield - - - + %li.dropdown + %a{:href => "#", :class => "dropdown-toggle", :data => {:toggle => "dropdown"}} + =image_tag (current_fuser.avatar? ? current_fuser.avatar.square.url : ""), :class => "img img-rounded", :style => "height:15px;" + =current_fuser.firstname + =current_fuser.name + %b.caret + %ul.dropdown-menu + %li.divider + %li=link_to "se déconnecter", logout_forum_auths_path, :method => :delete + + #toolbar-text + + #main.container-fluid - - - #flash - - -if flash[:alert] or (@flash_i and @flash_i[:alert]) - .message.closeable.alert - = flash[:alert] - = @flash_i[:alert] if @flash_i and @flash_i[:alert] - -if flash[:notice] - .message.closeable.notice - = flash[:notice] + = yield + + -if current_fuser and current_fuser.sheet and current_fuser.sheet.last_year < Date.today.year + %div{:style => "background:#e16b13;padding:10px;text-align:center;color:white;"} + %a{:href => "http://www.lepicvert.asso.fr/131/lassociation/adherer", :style => "color:white;text-decoration:none;"} + Attention : votre adhésion n'a pas encore été renouvelée pour + = Date.today.year.to_s+"." + + + + + + + .footer + %p{:style => "float:right;"} + -if current_fuser and current_fuser.sheet + Cotisation à jour pour + =current_fuser.sheet.last_year.to_s+" - " + N° d'adhésion : + ="#"+current_fuser.sheet.sheet_number.to_s + =link_to image_tag("logo.png", :style => "height:100px;"), "/forum" + + + + #flashs= bootstrap_flash + + + + + + + + + + diff --git a/app/views/layouts/gaspillage.html.haml b/app/views/layouts/gaspillage.html.haml new file mode 100644 index 0000000..96faf5d --- /dev/null +++ b/app/views/layouts/gaspillage.html.haml @@ -0,0 +1,26 @@ +!!! +%html{:manifest => "/gaspmanifest.appcache" } + %head + %title Quiz gaspillage alimentaire + =# stylesheet_link_tag "plaquettes", :media => "all" + =# javascript_include_tag "plaquettes" + = stylesheet_link_tag '/fonts/ArchitectsDaughter/stylesheet.css' + = stylesheet_link_tag '/assets/gaspillage.css' , :media => "all" + = javascript_include_tag '/assets/plaquettes.js' + = csrf_meta_tags + + + + + + %body + + + + + + #overlay + = yield :overlay + #main=yield + + diff --git a/app/views/layouts/plaquettes.html.haml b/app/views/layouts/plaquettes.html.haml index 2b3e89d..bf63a0c 100644 --- a/app/views/layouts/plaquettes.html.haml +++ b/app/views/layouts/plaquettes.html.haml @@ -1,9 +1,7 @@ !!! %html{:manifest => "/manifest.appcache" } %head - %title Le Pic Vert - Votre avis sur les sorties du Pic Vert - =# stylesheet_link_tag "plaquettes", :media => "all" - =# javascript_include_tag "plaquettes" + %title Plaquette pédagogique = stylesheet_link_tag '/fonts/ArchitectsDaughter/stylesheet.css' = stylesheet_link_tag '/assets/plaquettes.css' , :media => "all" = javascript_include_tag '/assets/plaquettes.js' @@ -12,6 +10,11 @@ + + + + + %body diff --git a/app/views/newsletter_mails/newsletter.html.haml b/app/views/newsletter_mails/newsletter.html.haml index 3f243e5..3e0edee 100644 --- a/app/views/newsletter_mails/newsletter.html.haml +++ b/app/views/newsletter_mails/newsletter.html.haml @@ -1,4 +1,10 @@ -=raw @content + +-if @options[:sheet] + - @lien_inscription_forum = link_to(new_forum_forum_user_url(:i => @options[:sheet].sheet_number, :email => @email),new_forum_forum_user_url(:i => @options[:sheet].sheet_number, :email => @email)) +-else + - @lien_inscription_forum = link_to(new_forum_forum_user_url(:email => @email),new_forum_forum_user_url(:email => @email)) + +=raw @content.gsub(/\[lien_inscription_forum\]/, @lien_inscription_forum) -if @newsletter.email_from and @newsletter.email_from != "" and @newsletter.email_from != "contact@lepicvert.asso.fr" %br diff --git a/app/views/plaquettes/animaux-batiment.html.haml b/app/views/plaquettes/animaux-batiment.html.haml index 1333fed..66d38fe 100644 --- a/app/views/plaquettes/animaux-batiment.html.haml +++ b/app/views/plaquettes/animaux-batiment.html.haml @@ -1,8 +1,8 @@ .page - .places_jeu + .places_jeu.content %h1 Où se cachent les animaux au Château de Longpra ? - %div{:style => "padding:22px;"} + %div{:style => "padding:0px 22px;"} .img{:style => "width:100%;"} =image_tag "plaquettes/jeu-batiment/batiment-jeu-2.jpg", :style => "width:100%;" @@ -27,7 +27,8 @@ =image_tag "plaquettes/jeu-batiment/7.jpg", :class => "droppable", :data => {:rep => 7, :legend => "Petit rinolophe"} .success - Bravo, tu as gagné. + %h3 Bravo tu as replacé tous les animaux ! + .btn.reset Rejouer =image_tag "plaquettes/jeu-batiment/batiment-jeu-1.jpg", :style => "width:100%;" diff --git a/app/views/plaquettes/gaspillage.haml b/app/views/plaquettes/gaspillage.haml new file mode 100644 index 0000000..6a00a9f --- /dev/null +++ b/app/views/plaquettes/gaspillage.haml @@ -0,0 +1,18 @@ +.page{:style => "background:url('/assets/plaquettes/fond.jpg'); background-size:cover;"} + + .content{:style => "position:absolute;background:rgba(250,250,250,0.8);right:0px;left:0px;top:0px;bottom:0px;height:auto;"} + + %h1 Quiz gaspillage alimentaire + + .quizz + =quizz [["Avez-vous l’impression de gaspiller de la nourriture :", [["Jamais ?",": 9 personnes sur 10 n’ont pas l’impression de gaspiller. Et si on regardait de plus près !","","",true,false],["Un peu ?","","","",true,false],["beaucoup ?","","","",true,false]]], ["Quand je jette une tomate abimée au compost, est-ce du gaspillage ?", [["oui"],["non"]], 1], ["Quand je donne le reste de viande au chien, est-ce du gaspillage ?", [["oui","Et oui ! Car on considère que le gaspillage alimentaire c’est toute nourriture destinée à l’alimentation humaine qui ne l’est pas au final… Par contre restons logique, mieux vaut la composter ou la donner aux animaux que de la jeter à la poubelle !","","",true,false],["Non",nil,"","",false]]] , ["Savez-vous quelle est, par français, la quantité moyenne de nourriture jetée chaque année à la maison ?", [["Moins de 5 kg"], ["Entre 5 et 10 kg"], ["Entre 10 et 20 kg,"],["Plus de 20 kg","(Source : France Nature Environnement FNE)"]],4], ["Du champ à l’assiette, quelle part de nourriture est perdue ou gaspillée ?", [["1/10"], ["1/4"], ["1/3", ": environ 1/3 d’après la FAO (Organisation des Nations Unies pour l’alimentation et l’agriculture)"]],3], ["A quelle étape de la chaine alimentaire le gaspillage est-il le plus important ?", [["La production (dans les champs)"], ["La transformation (dans l’industrie agro-alimentaire)"], ["La distribution (marchés et supermarchés)"], ["La consommation (maison, restaurant, cantines, …)", "Dans nos pays du Nord, la plus grande partie du gaspillage a lieu à la consommation"]],4], ["Selon vous quelle(s) est (sont) les bons réflexes anti-gaspi liés au courses. Cocher la(les) bonne(s) réponse(s).", [["je fais une liste de courses et je m'y tiens.", "je regarde ce qu’il reste chez moi, je fais une liste et je m'y tiens.", nil, nil, true], ["j'achète ce qui me fait envie dans les rayons"], ["j'achète en fonction des promotions"], ["je regarde avant de partir ce qu’il reste à manger chez moi", "je regarde ce qu’il reste chez moi, je fais une liste et je m'y tiens.", nil, nil, true]]], ["Dans le supermarché, il est important de faire attention aux dates limites de consommation mais elles n'ont pas toutes la même signification. La mention \"à consommer jusqu'au ...\" ou DLC signifie qu'après cette date :", [["les produits sont périmés ", "La DLC signifie : le produit est périmé, il peut présenter un risque pour la santé.", nil, nil, true], ["les consommer peut présenter un risque pour la santé", "La DLC signifie : le produit est périmé, il peut présenter un risque pour la santé.", nil, nil, true], ["les produits risquent de perdre certaines de leurs propriétés (saveur, texture, couleur)", "La DLC signifie : le produit est périmé, il peut présenter un risque pour la santé.", nil, nil, false]]], ["La mention \"à consommer de préférence avant le...\"ou DLUO signifie qu'après cette date :", [["les produits sont périmés ", "La DLUO signifie : le produit peut perdre certaines de ses propriétés, mais reste encore consommable"], ["les consommer peut présenter un risque pour la santé", "La DLUO signifie : le produit peut perdre certaines de ses propriétés, mais reste encore consommable"], ["les produits risquent de perdre certaines de leurs propriétés (saveur, texture, couleur)", "La DLUO signifie : le produit peut perdre certaines de ses propriétés, mais reste encore consommable"]],3], ["Dans mon frigo... Je range mes courses (dans mon réfrigérateur) ", [["je suis la règle : dernier entré, premier sorti "], ["je suis la règle dernier entré, dernier sorti", "et je respecte les zones de froid de mon réfrigérateur.", nil, nil, true] , ["je fais attention aux différentes zones de froid de mon réfrigérateur", "et je suis la règle dernier entré dernier sorti .", nil, nil, true] , ["j'entrepose tout rapidement pourvu que la porte ferme correctement"] ]], ["Selon vous combien de temps peut-on conserver au réfrigérateur les aliments suivants ?
            de la viande cuite : ", [ ["1-2 jours "], ["3/4 jours"], ["1 semaine"] ], 2], ["du poisson cuit : ", [ ["1-2 jours "], ["3/4 jours"], ["1 semaine"] ], 1] , ["de la soupe :", [ ["1-2 jours "], ["3/4 jours"], ["1 semaine"] ], 2], ["Un commerce ou un distributeur peut-il donner ses invendus alimentaires ?", [["Oui", "Un commerce ou un distributeur peut donner ses invendus à l’aide alimentaire, tout en tenant compte des délais liés à la logistique (la structure d’aide alimentaire doit avoir le temps de récupérer ces aliments et de les distribuer avant qu’ils n’atteignent leur date limite de consommation) et en respectant les règles d’hygiène et de sécurité alimentaires (continuité de la chaîne du froid, respect des dates limites de consommation...). (source FNE)"], ["Non"]], 1], ["Les recommandations du GEMRCN Groupe d’Etude des Marchés de Restauration Collective et de Nutrition qui a établi un guide pour acheteurs publics, une recommandation relative à la qualité nutritionnelle des repas servis en restauration collective. sont-elles obligatoires ? ", [["Oui"], ["Non", "Il s’agit de recommandations et non d’obligations. Cependant, certaines collectivités choisissent d’appliquer les recommandations du GEMRCN en les imposant aux fournisseurs dans le cahier des charges. (source FNE)"]], 2], ["Existe-t-il des obligations de grammage ?", [["Oui", "pour la restauration scolaire (de la maternelle au lycée, public comme privé). L’arrêté du 30 septembre 2011 relatif à la qualité nutritionnelle des repas servis dans le cadre de la restauration scolaire impose des grammages uniquement pour les produits prêts à consommer fabriqués par des fournisseurs extérieurs. Il s’agit des nems, crêpes, friands, steaks hachés, poissons panés, glaces, mousses… L’objectif de cet arrêté est notamment de lutter contre l’obésité. (source FNE)"], ["Non"]], 1], ["Une cantine peut-elle donner ses déchets alimentaires à des animaux (domestiques, de compagnie, d’élevage…)? ", [["Oui", "oui et non : Il n’est pas interdit de donner des restes alimentaires aux animaux qui ne sont pas destinés à la consommation humaine : animaux de compagnie, chiens dans les chenils, chevaux dans les centres équestres, animaux dans les zoo… En revanche, pour des raisons sanitaires, une réglementation européenne interdit de nourrir les animaux destinés à la consommation humaine avec des restes alimentaires (déchets de cuisine ou de table). (source FNE)", nil, nil, true], ["Non", "oui et non : Il n’est pas interdit de donner des restes alimentaires aux animaux qui ne sont pas destinés à la consommation humaine : animaux de compagnie, chiens dans les chenils, chevaux dans les centres équestres, animaux dans les zoo… En revanche, pour des raisons sanitaires, une réglementation européenne interdit de nourrir les animaux destinés à la consommation humaine avec des restes alimentaires (déchets de cuisine ou de table). (source FNE)", nil, nil, true]]], ["Qu’est-ce qu’un « doggy bag » ?", [["une nouvelle marque de sac à main"], ["contenant servant à repartir d’un restaurant avec ses restes", ": Plutôt que de jeter le reste du contenu de son assiette lorsque l’on n’a plus faim au restaurant, dans certains pays, repartir avec ses restes dans un « doggy bag » est devenue une pratique courante."]], 2], ["Quels produits doivent respecter un certains calibre ?", [ ["la fraise", " la fraise et le kiwi : Le calibrage des fruits et légumes a été imposé, à l’origine, par une réglementation européenne pour faciliter les échanges commerciaux entre les pays membres. 10 produits sont encore concernés : Agrumes, fraise, kiwi, pêche et nectarine, poire, poivron, pomme, raisin, salade, tomate. ", nil, nil, true], ["le melon"], ["le kiwi", " le kiwi et la fraise : Le calibrage des fruits et légumes a été imposé, à l’origine, par une réglementation européenne pour faciliter les échanges commerciaux entre les pays membres. 10 produits sont encore concernés : Agrumes, fraise, kiwi, pêche et nectarine, poire, poivron, pomme, raisin, salade, tomate. ", nil, nil, true], ["la courgette"] ]] ], "", "" + + + + + + +:javascript + document.ontouchmove = function(event){ + event.preventDefault(); + } \ No newline at end of file diff --git a/app/views/plaquettes/histoire-decomposition.html.haml b/app/views/plaquettes/histoire-decomposition.html.haml index e948812..417cc70 100644 --- a/app/views/plaquettes/histoire-decomposition.html.haml +++ b/app/views/plaquettes/histoire-decomposition.html.haml @@ -21,7 +21,7 @@ =jeux_sortable_img("feuille", 1, "width:200px;") .response - .win{:style => "display:none;text-align:center;"} + .success.win{:style => "display:none;text-align:center;"} %h3 Bravo ! Tu as remis les images dans l'ordre. %button.reset.btn Rejouer diff --git a/app/views/plaquettes/histoire-pollinisation.html.haml b/app/views/plaquettes/histoire-pollinisation.html.haml index 87159f4..e69de29 100644 --- a/app/views/plaquettes/histoire-pollinisation.html.haml +++ b/app/views/plaquettes/histoire-pollinisation.html.haml @@ -1,26 +0,0 @@ -.page - - .sortable_quizz - %h2 Histoire pollénisation - - .response{:style => "height:2em;"} - .win{:style => "display:none;"} - %p Bravo ! Tu as gagné, tu peux tirer les cheveux à l'animatrice ! - .loose{:style => "display:none;"} - %p Perdu, tu dois donner 10€ à l'animatrice, c'est la vie ! - %button.verif.btn.btn-primary Vérifier - %button.reset.btn Remettre à zero - .sortable{:style => "height:200px;"} - - =jeux_sortable_img("insectes_jeu_1", 4) - =jeux_sortable_img("insectes_jeu_1", 3) - - =jeux_sortable_img("insectes_jeu_1", 2) - =jeux_sortable_img("insectes_jeu_1", 5) - =jeux_sortable_img("insectes_jeu_1", 1) - - - .prev_slide - < - .next_slide - > \ No newline at end of file diff --git a/app/views/plaquettes/index.html.haml b/app/views/plaquettes/index.html.haml index 0f2faed..104808f 100644 --- a/app/views/plaquettes/index.html.haml +++ b/app/views/plaquettes/index.html.haml @@ -7,8 +7,10 @@ .next_slide > - =image_tag "plaquettes/logos/logo_longpra.png", :style => "width:500px;margin:auto;padding-top:1em;display:block;" - %h1{:style => "text-align:center;color:white;font-size:4em;margin-top:2em;font-weight:normal;"} Plaquette pédagogique + =image_tag "plaquettes/logos/logo_longpra.png", :style => "width:480px;margin:auto;padding-top:1em;display:block;" + %h1{:style => "text-align:center;color:white;font-size:3.5em;margin-top:1em;font-weight:normal;padding:0 1em;line-height:1.2em;"} Les merveilles de l'ordinaire au château de Longpra + %h2{:style => "text-align:center;color:white;font-size:2em;margin-top:1em;font-weight:normal;"} Plaquette pédagogique + =render :template => "plaquettes/faune-batiments" diff --git a/app/views/plaquettes/jeu-arbre.html.haml b/app/views/plaquettes/jeu-arbre.html.haml index 35839cd..d7b3cb4 100644 --- a/app/views/plaquettes/jeu-arbre.html.haml +++ b/app/views/plaquettes/jeu-arbre.html.haml @@ -27,6 +27,7 @@ .success %h3 Bravo tu as replacé tous les animaux ! + .btn.reset Rejouer .prev_slide < diff --git a/app/views/plaquettes/mur-insectes.haml b/app/views/plaquettes/mur-insectes.haml index 8fe1f02..61f039a 100644 --- a/app/views/plaquettes/mur-insectes.haml +++ b/app/views/plaquettes/mur-insectes.haml @@ -26,6 +26,7 @@ .success %h3 Bravo, tu as replacé tout les animaux + .btn.reset Rejouer .prev_slide < diff --git a/app/views/plaquettes/puzzle-chauve-souris.html.haml b/app/views/plaquettes/puzzle-chauve-souris.html.haml index 1c25285..47419cd 100644 --- a/app/views/plaquettes/puzzle-chauve-souris.html.haml +++ b/app/views/plaquettes/puzzle-chauve-souris.html.haml @@ -5,7 +5,7 @@ > .content - %h1 Puzzle Chauve souris + %h1 Puzzle -width = 760 -height = 475 @@ -48,9 +48,11 @@ =image_tag "plaquettes/chauve-souri-jeu.jpg", :style => "top:-#{height/3*2}px;left:-#{width/3*2}px;" .success{:style => "margin:1em;display:none;"} - %h2 Bravo, tu as réussi à reconstituer le puzzle. + %center + %h3{:style => "text-align:center;"} Bravo, tu as réussi à reconstituer le puzzle. + .btn.reset Rejouer diff --git a/app/views/plaquettes/puzzle-insectes.haml b/app/views/plaquettes/puzzle-insectes.haml index cfc5bab..41d2516 100644 --- a/app/views/plaquettes/puzzle-insectes.haml +++ b/app/views/plaquettes/puzzle-insectes.haml @@ -5,7 +5,7 @@ > .content - %h1 Puzzle d'une fourmi + %h1 Puzzle -width = 533 -height = 600 @@ -14,7 +14,7 @@ .puzzle.puzzle_insectes{:style => "position:relative;", :data => {:width => width.to_s+"px", :height => height.to_s+"px"}} .success{:style => "margin:1em;display:none;width:460px;right:-10px;top:10px;position:absolute;"} - %h2 Bravo, tu as réussi à reconstituer le puzzle. + %h3 Bravo, tu as réussi à reconstituer le puzzle. %center .btn.reset diff --git a/app/views/plaquettes/quizz-arbres.html.haml b/app/views/plaquettes/quizz-arbres.html.haml index d50222e..7c6ebdf 100644 --- a/app/views/plaquettes/quizz-arbres.html.haml +++ b/app/views/plaquettes/quizz-arbres.html.haml @@ -2,7 +2,7 @@ .content{:style => "position:absolute;background:rgba(250,250,250,0.8);width:460px;left:0px;top:0px;bottom:0px;height:auto;"} - %h1 Quiz arbres + %h1 Quiz .quizz =quizz [["Laquelle de ces plantes n’est pas un arbre ?", [["le lierre", "c’est une liane","plaquettes/arbres/lierre.jpg", "Lierre"], ["le sapin", "c’est un arbre de la famille des résineux"], ["le chêne ", "c’est un arbre de la famille des feuillus"]], 1],["Faut-il conserver certains arbres morts ?", [["Oui","il faut des arbres morts dans une forêt"], ["Non","les arbres morts sont très importants pour certains animaux, il faut donc en conserver quelques uns"]], 1, "plaquettes/vieux-arbre.jpg"], ["Parmi ces trois plantes laquelle trouve-t-on dans le parc du château de Longpra ?", [["le tilleul","on en trouve plusieurs", "plaquettes/tilleul.jpg"], ["le palmier","souviens-toi du texte"], ["le buddleia","souviens-toi du texte", "plaquettes/buddleia.jpg"]], 1],["Lequel de ces oiseaux fait son nid dans un trou d’arbre ?", [["le héron cendré ","avec ces grandes pattes il construit son nid en haut des arbres"], ["l’hirondelle rustique","elle construit un nid dans un bâtiment", "plaquettes/quizzs/hirondelle.jpg", "Hirondelles rustiques au nid"], ["le pic épeiche","il pond ses œufs dans un trou d’arbre", "plaquettes/quizzs/pic.jpg", "Pic épeiche"]], 3],["Le lierre est-il une plante parasite ?", [["oui","il ne tue pas les arbres, il s’en sert pour chercher de la lumière"], ["Non",", il ne tue pas les arbres, il s’en sert pour chercher de la lumière"]], 2, "plaquettes/arbres/lierre.jpg"] ], "Bravo tu as répondu à toutes les questions.", "" diff --git a/app/views/plaquettes/quizz-batiments.html.haml b/app/views/plaquettes/quizz-batiments.html.haml index 0c370ee..8ac12d4 100644 --- a/app/views/plaquettes/quizz-batiments.html.haml +++ b/app/views/plaquettes/quizz-batiments.html.haml @@ -3,7 +3,7 @@ .content{:style => "position:absolute;background:rgba(250,250,250,0.8);width:460px;left:0px;top:0px;bottom:0px;height:auto;"} - %h1 Quiz faune des bâtiments + %h1 Quiz .quizz =quizz [["Comment s’appellent les petites boules qui contiennent les déchets que la chouette effraie ne peut pas digérer?", [["Les pelotes de laine "], ["Les pelotes de déjection "], ["Les pelotes de rejection "]], 3, "plaquettes/pelotte.jpg", "Pelote"],["Quels animaux sont les proies préférées de la chouette effraie ?", [["les campagnols ","elle peut en manger plus de 1500 par an", "plaquettes/quizzs/campagnol.jpg", "Campagnol"], ["les renards","Ils sont les concurrents de la chouette : ils mangent eux aussi des campagnols", "plaquettes/renard.jpg", "Renard"], ["les lézards","ils vivent le jour alors que la chouette ne chasse que la nuit", "plaquettes/quizzs/lezard.jpg", "Lézard des murailles"]], 1], ["A quelle famille les lézards appartiennent-ils ?", [["amphibiens ","c’est la famille des grenouilles et crapauds"], ["mammifères","c’est la famille des animaux qui allaitent leurs petits"], ["reptiles ","les serpents en font également partie"]], 3, "plaquettes/quizzs/lezard.jpg", "Lézard des murailles"],["En hiver, où trouve-t-on les petits rhinolophes au château de Longpra ?", [["dans le grenier ","si il fait trop froid, il quittera le grenier pour la cave ou la température diminue moins et où les conditions d'humidité sont plus favorables.","/assets/plaquettes/combles.jpg", "Charpente", true], ["dans la cave ","la température est stable et l’humidité permet au petit rhinolophe de garder ses ailes humides.","/assets/plaquettes/cave.jpg", "Cave du chateau", true], ["dans les vieux arbres","on les trouve dans les bâtiments", "plaquettes/arbres/chandelle.jpg", "Chandelle"]], 2],["Comment appelle-t-on les animaux qui vivent la nuit comme le blaireau ou la chouette ?", [["somnambules ","ce sont les personnes qui marchent en dormant"], ["nocturnes "," ils dorment la journée et s’activent dès la tombée de la nuit"], ["nuisibles","ce sont les animaux rejetés par l'homme car ils peuvent abimer les jardins, les récoltes... "]], 2, "plaquettes/quizzs/chouette.jpg"] ], "Bravo tu as répondu à toutes les questions.", "Au château de Longpra, il y a de nombreuses cachettes pour les animaux. Et chez toi ?... Si tu n'en as pas, tu peux en construire : nichoirs, tas de bois... " diff --git a/app/views/plaquettes/vie-arbre.html.haml b/app/views/plaquettes/vie-arbre.html.haml index 2ccefce..e69b299 100644 --- a/app/views/plaquettes/vie-arbre.html.haml +++ b/app/views/plaquettes/vie-arbre.html.haml @@ -1,7 +1,7 @@ .page .content{:style => "width:500px;box-sizing:border-box;padding:1em;font-size:0.99em;"} %h1{:style => "margin-bottom:-5px;z-index:2;position:relative;"} La vie du tilleul. - .sortable_quizz + .sortable_quizz.vie-arbre-place @@ -48,8 +48,8 @@ %a.img{:data => {:img => "/assets/plaquettes/croissance.jpg", :legend => "Développement progressif d'une plante"}} croissance. Son tronc est devenu très large et il possède de nombreuses branches feuillues. Des animaux viennent trouver de l’ombre à son pied. - .success{:style => "position:absolute;bottom:0px;left:80px;color:green;display:none;"} - %h3 + .success{:style => "position:absolute;bottom:0px;left:80px;color:green;display:none;text-align:center;"} + %h3{:style => "text-align:center;"} Bravo tu as réussi à remettre l'histoire dans l'ordre. .btn.reset Rejouer diff --git a/config/deploy.rb b/config/deploy.rb index 2163ec9..ee30430 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -1,6 +1,6 @@ # -*- encoding : utf-8 -*- set :application, 'pic_vert_app' - set :domain, 'www2.lepicvert.asso.fr' + set :domain, 'lepicvert.org' diff --git a/config/environments/development.rb b/config/environments/development.rb index 4973ae0..9ec620f 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -4,44 +4,33 @@ HOSTNAME = 'localhost:3000' Survey::Application.configure do - # Settings specified here will take precedence over those in config/application.rb - - # In the development environment your application's code is reloaded on - # every request. This slows down response time but is perfect for development # since you don't have to restart the web server when you make code changes. config.cache_classes = false - # Log error messages when you accidentally call methods on nil. - config.whiny_nils = true + # Do not eager load code on boot. + config.eager_load = false - # Show full error reports and disable caching + # Show full error reports and disable caching. config.consider_all_requests_local = true config.action_controller.perform_caching = false - # Don't care if the mailer can't send + # Don't care if the mailer can't send. config.action_mailer.raise_delivery_errors = false - # Print deprecation notices to the Rails logger + # Print deprecation notices to the Rails logger. config.active_support.deprecation = :log - # Only use best-standards-support built into browsers - config.action_dispatch.best_standards_support = :builtin + # Raise an error on page load if there are pending migrations + config.active_record.migration_error = :page_load - # Raise exception on mass assignment protection for Active Record models - config.active_record.mass_assignment_sanitizer = :strict - - # Log the query plan for queries taking more than this (works - # with SQLite, MySQL, and PostgreSQL) - config.active_record.auto_explain_threshold_in_seconds = 0.5 - - # Do not compress assets - config.assets.compress = false - - # Expands the lines which load the assets - config.assets.debug = false + # Debug mode disables concatenation and preprocessing of assets. + # This option may cause significant delays in view rendering with a large + # number of complex assets. + config.assets.debug = true + config.action_mailer.delivery_method = :file - config.action_mailer.default_url_options = { :host => HOSTNAME } + config.action_mailer.default_url_options = { :host => 'localhost:3000' } end diff --git a/config/environments/production.rb b/config/environments/production.rb index 2e76f05..bc53d0f 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -2,67 +2,94 @@ HOSTNAME = 'http://lepicvert.org' Survey::Application.configure do - # Settings specified here will take precedence over those in config/application.rb + # Settings specified here will take precedence over those in config/application.rb. - # Code is not reloaded between requests + # Code is not reloaded between requests. config.cache_classes = true - # Full error reports are disabled and caching is turned on + # Eager load code on boot. This eager loads most of Rails and + # your application in memory, allowing both thread web servers + # and those relying on copy on write to perform better. + # Rake tasks automatically ignore this option for performance. + config.eager_load = true + + # Full error reports are disabled and caching is turned on. config.consider_all_requests_local = false config.action_controller.perform_caching = true - # Disable Rails's static asset server (Apache or nginx will already do this) + # Enable Rack::Cache to put a simple HTTP cache in front of your application + # Add `rack-cache` to your Gemfile before enabling this. + # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid. + # config.action_dispatch.rack_cache = true + + # Disable Rails's static asset server (Apache or nginx will already do this). config.serve_static_assets = false - # Compress JavaScripts and CSS - config.assets.compress = false + # Compress JavaScripts and CSS. + config.assets.js_compressor = :uglifier + # config.assets.css_compressor = :sass - # Don't fallback to assets pipeline if a precompiled asset is missed - config.assets.compile = true + # Do not fallback to assets pipeline if a precompiled asset is missed. + config.assets.compile = false - # Generate digests for assets URLs - config.assets.digest = true + # Generate digests for assets URLs. + config.assets.digest = false - # Defaults to nil and saved in location specified by config.assets.prefix - # config.assets.manifest = YOUR_PATH - - # Specifies the header that your server uses for sending files + # Version of your assets, change this if you want to expire all your assets. + config.assets.version = '1.0' + + + #config.assets.initialize_on_precompile = false + + + # Specifies the header that your server uses for sending files. # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache - # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx + config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. # config.force_ssl = true - # See everything in the log (default is :info) - # config.log_level = :debug + # Set to :debug to see everything in the log. + config.log_level = :info - # Prepend all log lines with the following tags + # Prepend all log lines with the following tags. # config.log_tags = [ :subdomain, :uuid ] - # Use a different logger for distributed setups + # Use a different logger for distributed setups. # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) - # Use a different cache store in production + # Use a different cache store in production. # config.cache_store = :mem_cache_store - # Enable serving of images, stylesheets, and JavaScripts from an asset server + # Enable serving of images, stylesheets, and JavaScripts from an asset server. # config.action_controller.asset_host = "http://assets.example.com" - # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added) + # Precompile additional assets. + # application.js, application.css, and all non-JS/CSS in app/assets folder are already added. config.assets.precompile += %w( admin.js admin.css forum.css forum.js plaquettes.css plaquettes.js connexion.js connexion.css ) - # Disable delivery errors, bad email addresses will be ignored - config.action_mailer.raise_delivery_errors = false + + - # Enable threaded mode - # config.threadsafe! + # Ignore bad email addresses and do not raise email delivery errors. + # Set this to true and configure the email server for immediate delivery to raise delivery errors. + # config.action_mailer.raise_delivery_errors = false # Enable locale fallbacks for I18n (makes lookups for any locale fall back to - # the I18n.default_locale when a translation can not be found) + # the I18n.default_locale when a translation can not be found). config.i18n.fallbacks = true - # Send deprecation notices to registered listeners + # Send deprecation notices to registered listeners. config.active_support.deprecation = :notify + + # Disable automatic flushing of the log to improve performance. + # config.autoflush_log = false + + # Use default logging formatter so that PID and timestamp are not suppressed. + config.log_formatter = ::Logger::Formatter.new + + + config.action_mailer.default_url_options = { :host => "lepicvert.org" } diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index aef2298..1b4ad10 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -234,5 +234,8 @@ Devise.setup do |config| config.authentication_keys = [ :username ] config.case_insensitive_keys = [ :username ] config.strip_whitespace_keys = [ :username ] + config.secret_key = '70d0e9ef79907401ef043610c8bd4b3ed6c08bef3ae4f0f22afa6b3df930a891def63dc1d9d538446cc647086ca0c3f155cc94e161488b428d21b6a9e4621925' + + end diff --git a/config/routes.rb b/config/routes.rb index 3f5951f..ab5afa1 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -2,14 +2,17 @@ Survey::Application.routes.draw do devise_for :admins, :controllers => {:sessions => "admins/sessions", :passwords => "admins/passwords"} + get 'plaquettes/gaspillage.:f' => 'plaquettes#gaspillage', :f => "html" + get 'plaquettes/:slug.:f' => 'plaquettes#show', :f => "html" + - match 'plaquettes/:slug.:f' => 'plaquettes#show', :as => :plaquette, :f => "html" - get "forum_user/index" - #admin namespace :admin do + + put "sheets" => "sheets#index" + root :to => "dashboard#index" resources :admins @@ -57,8 +60,12 @@ Survey::Application.routes.draw do #forum + + get "forum_user/index" + + namespace :forum do - root :to => "forums#show", :id => 1 + root :to => "forum_topics#index", :id => 1 resources :forum_topics resources :forum_messages resources :forums @@ -84,14 +91,14 @@ Survey::Application.routes.draw do - match 'u/:id' => 'tiny_urls#show', :as => :tiny_url + get 'u/:id' => 'tiny_urls#show', :as => :tiny_url - match 'sondages/:slug/merci-de-votre-participation.:f' => 'survey_sets#thank', :as => :thank_survey_set, :f => "html" - match 'sondages/:slug.:f' => 'survey_sets#new', :as => :new_survey_set, :f => "html" - match 'sondages/:slug/resultats.:f' => 'survey_sets#show', :as => :survey_set, :f => "html" + get 'sondages/:slug/merci-de-votre-participation.:f' => 'survey_sets#thank', :as => :thank_survey_set, :f => "html" + get 'sondages/:slug.:f' => 'survey_sets#new', :as => :new_survey_set, :f => "html" + get 'sondages/:slug/resultats.:f' => 'survey_sets#show', :as => :survey_set, :f => "html" - match 'petitions/:id.:f' => 'petitions#show', :as => :petition, :f => "html" + get 'petitions/:id.:f' => 'petitions#show', :as => :petition, :f => "html" resources :petitions do @@ -109,7 +116,7 @@ Survey::Application.routes.draw do end - root :to => 'admin/dashboard#index' + root :to => redirect("http://lepicvert.asso.fr") end diff --git a/config/unicorn_dev.rb b/config/unicorn_dev.rb new file mode 100644 index 0000000..2239717 --- /dev/null +++ b/config/unicorn_dev.rb @@ -0,0 +1,2 @@ +worker_processes 5 +timeout 600 diff --git a/db/migrate/20140410151036_add_sheet_number_to_forum_user.rb b/db/migrate/20140410151036_add_sheet_number_to_forum_user.rb new file mode 100644 index 0000000..9a35012 --- /dev/null +++ b/db/migrate/20140410151036_add_sheet_number_to_forum_user.rb @@ -0,0 +1,12 @@ +class AddSheetNumberToForumUser < ActiveRecord::Migration + def change + add_column :forum_users, :sheet_number, :string + add_column :forum_users, :sheet_id, :integer + add_column :forum_users, :show_email, :boolean + add_column :forum_users, :new_message_notification, :boolean + add_column :forum_users, :last_new_message_notification, :datetime + + add_column :forum_users, :new_message_on_my_topics_notification, :boolean + add_column :forum_users, :last_new_message_on_my_topics_notification, :datetime + end +end diff --git a/db/schema.rb b/db/schema.rb index 927c92a..da9fd81 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -9,46 +9,46 @@ # from scratch. The latter is a flawed and unsustainable approach (the more migrations # you'll amass, the slower it'll run and the greater likelihood for issues). # -# It's strongly recommended to check this file into your version control system. +# It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(:version => 20130717000000) do +ActiveRecord::Schema.define(version: 20140410151036) do - create_table "admins", :force => true do |t| - t.string "email", :default => "", :null => false - t.string "encrypted_password", :default => "", :null => false + create_table "admins", force: true do |t| + t.string "email", default: "", null: false + t.string "encrypted_password", default: "", null: false t.string "reset_password_token" t.datetime "reset_password_sent_at" t.datetime "remember_created_at" - t.integer "sign_in_count", :default => 0 + t.integer "sign_in_count", default: 0 t.datetime "current_sign_in_at" t.datetime "last_sign_in_at" t.string "current_sign_in_ip" t.string "last_sign_in_ip" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.string "username" t.string "name" t.string "firstname" t.string "file" end - add_index "admins", ["email"], :name => "index_admins_on_email", :unique => true - add_index "admins", ["reset_password_token"], :name => "index_admins_on_reset_password_token", :unique => true + add_index "admins", ["email"], name: "index_admins_on_email", unique: true, using: :btree + add_index "admins", ["reset_password_token"], name: "index_admins_on_reset_password_token", unique: true, using: :btree - create_table "answer_sets", :force => true do |t| + create_table "answer_sets", force: true do |t| t.integer "question_set_id" t.integer "survey_item_answer_id" t.text "content" t.boolean "is_checked" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.integer "position" end - add_index "answer_sets", ["question_set_id"], :name => "index_answer_sets_on_question_set_id" - add_index "answer_sets", ["survey_item_answer_id"], :name => "index_answer_sets_on_survey_item_answer_id" + add_index "answer_sets", ["question_set_id"], name: "index_answer_sets_on_question_set_id", using: :btree + add_index "answer_sets", ["survey_item_answer_id"], name: "index_answer_sets_on_survey_item_answer_id", using: :btree - create_table "donates", :force => true do |t| + create_table "donates", force: true do |t| t.date "paid_at" t.integer "amount" t.integer "payment_type" @@ -60,119 +60,126 @@ ActiveRecord::Schema.define(:version => 20130717000000) do t.datetime "updated_at" end - create_table "forum_categories", :force => true do |t| + create_table "forum_categories", force: true do |t| t.string "title" t.text "description" t.integer "parent_id" t.integer "forum_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end - create_table "forum_messages", :force => true do |t| + create_table "forum_messages", force: true do |t| t.integer "forum_user_id" t.integer "forum_topic_id" t.string "title" t.text "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end - add_index "forum_messages", ["forum_user_id"], :name => "index_forum_messages_on_forum_user_id" + add_index "forum_messages", ["forum_user_id"], name: "index_forum_messages_on_forum_user_id", using: :btree - create_table "forum_topics", :force => true do |t| + create_table "forum_topics", force: true do |t| t.integer "forum_user_id" t.integer "category_id" t.string "title" t.text "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end - add_index "forum_topics", ["forum_user_id"], :name => "index_forum_topics_on_forum_user_id" + add_index "forum_topics", ["forum_user_id"], name: "index_forum_topics_on_forum_user_id", using: :btree - create_table "forum_user_images", :force => true do |t| + create_table "forum_user_images", force: true do |t| t.integer "album_id_id" t.integer "forum_user_id" t.string "image" t.string "title" t.integer "views" t.text "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end - add_index "forum_user_images", ["album_id_id"], :name => "index_forum_user_images_on_album_id_id" - add_index "forum_user_images", ["forum_user_id"], :name => "index_forum_user_images_on_forum_user_id" + add_index "forum_user_images", ["album_id_id"], name: "index_forum_user_images_on_album_id_id", using: :btree + add_index "forum_user_images", ["forum_user_id"], name: "index_forum_user_images_on_forum_user_id", using: :btree - create_table "forum_users", :force => true do |t| + create_table "forum_users", force: true do |t| t.string "name" t.string "firstname" t.text "bio" t.string "avatar" - t.string "email", :default => "", :null => false - t.string "password_digest", :default => "", :null => false + t.string "email", default: "", null: false + t.string "password_digest", default: "", null: false t.string "reset_password_token" t.datetime "reset_password_sent_at" t.datetime "remember_created_at" - t.integer "sign_in_count", :default => 0 + t.integer "sign_in_count", default: 0 t.datetime "current_sign_in_at" t.datetime "last_sign_in_at" t.string "current_sign_in_ip" t.string "last_sign_in_ip" t.boolean "lock" t.datetime "locked_at" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.string "sheet_number" + t.integer "sheet_id" + t.boolean "show_email" + t.boolean "new_message_notification" + t.datetime "last_new_message_notification" + t.boolean "new_message_on_my_topics_notification" + t.datetime "last_new_message_on_my_topics_notification" end - create_table "forums", :force => true do |t| + create_table "forums", force: true do |t| t.string "title" t.text "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end - create_table "newsgroups", :force => true do |t| + create_table "newsgroups", force: true do |t| t.string "name" t.text "description" t.datetime "created_at" t.datetime "updated_at" end - create_table "newsletters", :force => true do |t| + create_table "newsletters", force: true do |t| t.string "title" t.text "content" t.datetime "sendmail" t.boolean "archive" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.string "email_from" end - create_table "note_files", :force => true do |t| + create_table "note_files", force: true do |t| t.string "file" t.string "name" t.string "slug" t.text "description" t.integer "admin_id" t.integer "note_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end - create_table "notes", :force => true do |t| + create_table "notes", force: true do |t| t.string "subject" t.text "message" t.integer "admin_id" t.integer "topic_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end - add_index "notes", ["admin_id"], :name => "index_notes_on_admin_id" + add_index "notes", ["admin_id"], name: "index_notes_on_admin_id", using: :btree - create_table "people", :force => true do |t| + create_table "people", force: true do |t| t.boolean "newsletter" t.string "surname" t.string "firstname" @@ -185,14 +192,14 @@ ActiveRecord::Schema.define(:version => 20130717000000) do t.datetime "updated_at" end - create_table "people_newsgroups", :force => true do |t| + create_table "people_newsgroups", force: true do |t| t.integer "person_id" t.integer "newsgroup_id" t.datetime "created_at" t.datetime "updated_at" end - create_table "petition_signators", :force => true do |t| + create_table "petition_signators", force: true do |t| t.integer "petition_id" t.string "firstname" t.string "name" @@ -204,34 +211,34 @@ ActiveRecord::Schema.define(:version => 20130717000000) do t.string "email" t.boolean "enabled" t.string "token" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end - add_index "petition_signators", ["petition_id"], :name => "index_petition_signators_on_petition_id" + add_index "petition_signators", ["petition_id"], name: "index_petition_signators_on_petition_id", using: :btree - create_table "petitions", :force => true do |t| + create_table "petitions", force: true do |t| t.string "name" t.text "description" t.string "slug" t.boolean "enabled" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end - create_table "question_sets", :force => true do |t| + create_table "question_sets", force: true do |t| t.integer "survey_item_id" t.integer "survey_set_id" t.text "content" t.boolean "boolean_content" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end - add_index "question_sets", ["survey_item_id"], :name => "index_question_sets_on_survey_item_id" - add_index "question_sets", ["survey_set_id"], :name => "index_question_sets_on_survey_set_id" + add_index "question_sets", ["survey_item_id"], name: "index_question_sets_on_survey_item_id", using: :btree + add_index "question_sets", ["survey_set_id"], name: "index_question_sets_on_survey_set_id", using: :btree - create_table "sheet_years", :force => true do |t| + create_table "sheet_years", force: true do |t| t.integer "year" t.integer "join_type" t.boolean "gift_year" @@ -247,7 +254,7 @@ ActiveRecord::Schema.define(:version => 20130717000000) do t.boolean "plume" end - create_table "sheets", :force => true do |t| + create_table "sheets", force: true do |t| t.string "corporate" t.string "other_phone" t.string "other_mail" @@ -269,7 +276,7 @@ ActiveRecord::Schema.define(:version => 20130717000000) do t.string "sheet_number" end - create_table "survey_item_answers", :force => true do |t| + create_table "survey_item_answers", force: true do |t| t.text "label_text" t.text "help_text" t.string "class_text" @@ -278,13 +285,13 @@ ActiveRecord::Schema.define(:version => 20130717000000) do t.integer "survey_item_id" t.boolean "locked" t.boolean "archived" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end - add_index "survey_item_answers", ["survey_item_id"], :name => "index_survey_item_answers_on_survey_item_id" + add_index "survey_item_answers", ["survey_item_id"], name: "index_survey_item_answers_on_survey_item_id", using: :btree - create_table "survey_items", :force => true do |t| + create_table "survey_items", force: true do |t| t.integer "item_type" t.text "title" t.text "description" @@ -297,21 +304,21 @@ ActiveRecord::Schema.define(:version => 20130717000000) do t.boolean "archived" t.integer "text_presentation" t.integer "max_checkboxes" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end - add_index "survey_items", ["survey_type_id"], :name => "index_survey_items_on_survey_type_id" + add_index "survey_items", ["survey_type_id"], name: "index_survey_items_on_survey_type_id", using: :btree - create_table "survey_sets", :force => true do |t| + create_table "survey_sets", force: true do |t| t.integer "survey_type_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end - add_index "survey_sets", ["survey_type_id"], :name => "index_survey_sets_on_survey_type_id" + add_index "survey_sets", ["survey_type_id"], name: "index_survey_sets_on_survey_type_id", using: :btree - create_table "survey_types", :force => true do |t| + create_table "survey_types", force: true do |t| t.string "name" t.string "slug" t.text "description" @@ -319,29 +326,29 @@ ActiveRecord::Schema.define(:version => 20130717000000) do t.text "intro_text" t.boolean "locked" t.boolean "archived" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end - create_table "tiny_urls", :force => true do |t| + create_table "tiny_urls", force: true do |t| t.string "url" t.string "slug" t.text "description" t.datetime "start_at" t.datetime "stop_at" t.integer "nbr_views" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end - create_table "topics", :force => true do |t| + create_table "topics", force: true do |t| t.string "title" t.text "description" t.integer "admin_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end - add_index "topics", ["admin_id"], :name => "index_topics_on_admin_id" + add_index "topics", ["admin_id"], name: "index_topics_on_admin_id", using: :btree end diff --git a/oldGemfile b/oldGemfile new file mode 100644 index 0000000..6525694 --- /dev/null +++ b/oldGemfile @@ -0,0 +1,71 @@ +source 'https://rubygems.org' + +gem 'rails', '4.0.0' + +# Bundle edge Rails instead: +# gem 'rails', :git => 'git://github.com/rails/rails.git' + +gem "mysql2" + + +# Gems used only for assets and not required +# in production environments by default. +group :assets do + gem 'sass-rails', '~> 3.2.3' + gem 'coffee-rails', '~> 3.2.1' + + # See https://github.com/sstephenson/execjs#readme for more supported runtimes + # gem 'therubyracer', :platforms => :ruby + + gem 'uglifier', '>= 1.0.3' + + gem 'compass-rails' + gem 'zurb-foundation', ">= 3.2" +end + +gem 'jquery-rails' +gem 'jquery-ui-rails' +gem "raptor-editor-rails" + +# To use ActiveModel has_secure_password +# gem 'bcrypt-ruby', '~> 3.0.0' + +# To use Jbuilder templates for JSON +# gem 'jbuilder' + +# Use unicorn as the app server +gem 'unicorn' + +# Deploy with Capistrano +# gem 'capistrano' + +# To use debugger +# gem 'debugger' +gem 'capistrano' +gem 'rvm-capistrano' +gem 'gravatar_image_tag' + +gem 'formtastic' +gem 'haml' + +gem 'acts_as_tree' + + +gem "devise" +gem "cancan" + +gem 'kaminari' +gem 'carrierwave' +gem 'rmagick' +gem "geocoder" + +#markdown +gem 'pygments.rb' +gem 'redcarpet' + +gem 'nokogiri' + +#gem 'thin' +gem "therubyracer" +gem "less-rails" #Sprockets (what Rails 3.1 uses for its asset pipeline) supports LESS +gem "twitter-bootstrap-rails" diff --git a/public/apple-iconp.png b/public/apple-iconp.png new file mode 100644 index 0000000..1bdd6b6 Binary files /dev/null and b/public/apple-iconp.png differ diff --git a/public/favicon copy.ico b/public/favicon copy.ico new file mode 100644 index 0000000..74462c4 Binary files /dev/null and b/public/favicon copy.ico differ diff --git a/public/favicon.ico b/public/favicon.ico deleted file mode 100644 index e69de29..0000000 diff --git a/public/faviconp.ico b/public/faviconp.ico new file mode 100644 index 0000000..74462c4 Binary files /dev/null and b/public/faviconp.ico differ diff --git a/public/fonts/FontAwesome.otf b/public/fonts/FontAwesome.otf new file mode 100644 index 0000000..8b0f54e Binary files /dev/null and b/public/fonts/FontAwesome.otf differ diff --git a/public/fonts/fontawesome-webfont.eot b/public/fonts/fontawesome-webfont.eot index c080283..7c79c6a 100755 Binary files a/public/fonts/fontawesome-webfont.eot and b/public/fonts/fontawesome-webfont.eot differ diff --git a/public/fonts/fontawesome-webfont.svg b/public/fonts/fontawesome-webfont.svg index 10a1e1b..45fdf33 100755 --- a/public/fonts/fontawesome-webfont.svg +++ b/public/fonts/fontawesome-webfont.svg @@ -52,8 +52,8 @@ - - + + @@ -63,7 +63,7 @@ - + @@ -138,7 +138,7 @@ - + @@ -178,7 +178,7 @@ - + @@ -193,7 +193,7 @@ - + @@ -250,7 +250,7 @@ - + @@ -277,11 +277,11 @@ - + - - + + @@ -310,15 +310,15 @@ - + - - + + @@ -333,7 +333,82 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/fonts/fontawesome-webfont.ttf b/public/fonts/fontawesome-webfont.ttf index 908f69e..e89738d 100755 Binary files a/public/fonts/fontawesome-webfont.ttf and b/public/fonts/fontawesome-webfont.ttf differ diff --git a/public/fonts/fontawesome-webfont.woff b/public/fonts/fontawesome-webfont.woff index a33af95..8c1748a 100755 Binary files a/public/fonts/fontawesome-webfont.woff and b/public/fonts/fontawesome-webfont.woff differ diff --git a/public/gaspmanifest.appcache b/public/gaspmanifest.appcache new file mode 100644 index 0000000..36ed07f --- /dev/null +++ b/public/gaspmanifest.appcache @@ -0,0 +1,21 @@ +CACHE MANIFEST + +# version3 + +CACHE: +/plaquettes/index.html +/assets/gaspillage.css +/assets/plaquettes.js +/fonts/ArchitectsDaughter/stylesheet.css + + +/fonts/ArchitectsDaughter/architectsdaughter-webfont.woff + +/fonts/ArchitectsDaughter/architectsdaughter-webfont.ttf + + + +FALLBACK: + +NETWORK: +* \ No newline at end of file diff --git a/public/login_background.jpg b/public/login_background.jpg new file mode 100644 index 0000000..7b2a1d1 Binary files /dev/null and b/public/login_background.jpg differ diff --git a/public/login_background2.jpg b/public/login_background2.jpg new file mode 100644 index 0000000..994a6f6 Binary files /dev/null and b/public/login_background2.jpg differ diff --git a/public/login_background3.jpg b/public/login_background3.jpg new file mode 100644 index 0000000..6806a47 Binary files /dev/null and b/public/login_background3.jpg differ diff --git a/public/manifest.appcache b/public/manifest.appcache index 624817c..0e86e76 100644 --- a/public/manifest.appcache +++ b/public/manifest.appcache @@ -1,6 +1,6 @@ CACHE MANIFEST -# version 19 +# version6 CACHE: /plaquettes/index.html @@ -92,7 +92,29 @@ CACHE: /assets/plaquettes/quizzs/fond_jardin.jpg /fonts/ArchitectsDaughter/architectsdaughter-webfont.ttf /assets/plaquettes/jeu-batiment/2.jpg - +/assets/plaquettes/jeu-batiment/merle.jpg +/assets/plaquettes/moineau.jpg +/assets/plaquettes/chauve-souri.jpg +/assets/plaquettes/marronier.jpg +/assets/plaquettes/arbres/pic.jpg +/assets/plaquettes/abre-mort.jpg +/assets/plaquettes/osmie.jpg +/assets/plaquettes/insectes/puceron.jpg +/assets/plaquettes/insectes/coccinelle.jpg +/assets/plaquettes/insectes/chrysope.jpg +/assets/plaquettes/moelle.jpg +/assets/plaquettes/buche-perces.jpg +/assets/plaquettes/abri-coccinelle.jpg +/assets/plaquettes/lombric.jpg +/assets/plaquettes/jardin/humus.jpg +/assets/plaquettes/feuille.jpg +/assets/plaquettes/noix.jpg +/assets/plaquettes/jardin/sac.jpg +/assets/plaquettes/jardin/piege.jpg +/assets/plaquettes/jardin/tas.jpg +/assets/plaquettes/jardin/campagnol.jpg +/apple-icon.png +/favicon.ico FALLBACK: