Nettoyage de code pour suivre les dernières métriques ABC

This commit is contained in:
echarp 2014-11-05 21:25:18 +01:00
parent 542abdf7de
commit bb5a037356
88 changed files with 2492 additions and 2317 deletions

View File

@ -4,6 +4,7 @@ source 'https://rubygems.org'
gem 'simple_calendar' gem 'simple_calendar'
gem 'rails' gem 'rails'
gem 'has_scope'
# Use SCSS for stylesheets # Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0.0.beta1' gem 'sass-rails', '~> 5.0.0.beta1'

View File

@ -1,6 +1,6 @@
GIT GIT
remote: git://github.com/activeadmin/activeadmin.git remote: git://github.com/activeadmin/activeadmin.git
revision: c26ae0b1393311180b5137c6b4a271de3385d069 revision: 809142efe855e590331cdc41e72dcad76b719a46
specs: specs:
activeadmin (1.0.0.pre) activeadmin (1.0.0.pre)
arbre (~> 1.0, >= 1.0.2) arbre (~> 1.0, >= 1.0.2)
@ -150,7 +150,7 @@ GEM
actionpack (>= 3.2.13) actionpack (>= 3.2.13)
formtastic_i18n (0.1.1) formtastic_i18n (0.1.1)
geocoder (1.2.5) geocoder (1.2.5)
guard (2.7.1) guard (2.8.0)
formatador (>= 0.2.4) formatador (>= 0.2.4)
listen (~> 2.7) listen (~> 2.7)
lumberjack (~> 1.0) lumberjack (~> 1.0)
@ -169,7 +169,7 @@ GEM
guard-minitest (2.3.2) guard-minitest (2.3.2)
guard (~> 2.0) guard (~> 2.0)
minitest (>= 3.0) minitest (>= 3.0)
guard-rubocop (1.1.0) guard-rubocop (1.2.0)
guard (~> 2.0) guard (~> 2.0)
rubocop (~> 0.20) rubocop (~> 0.20)
haml (4.0.5) haml (4.0.5)
@ -219,7 +219,7 @@ GEM
rb-fsevent (>= 0.9.3) rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9) rb-inotify (>= 0.9)
lumberjack (1.0.9) lumberjack (1.0.9)
mail (2.6.1) mail (2.6.3)
mime-types (>= 1.16, < 3) mime-types (>= 1.16, < 3)
memoizable (0.4.2) memoizable (0.4.2)
thread_safe (~> 0.3, >= 0.3.1) thread_safe (~> 0.3, >= 0.3.1)
@ -234,7 +234,7 @@ GEM
mysql2 (0.3.16) mysql2 (0.3.16)
naught (1.0.0) naught (1.0.0)
orm_adapter (0.5.0) orm_adapter (0.5.0)
parser (2.2.0.pre.6) parser (2.2.0.pre.7)
ast (>= 1.1, < 3.0) ast (>= 1.1, < 3.0)
slop (~> 3.4, >= 3.4.5) slop (~> 3.4, >= 3.4.5)
polyamorous (1.1.0) polyamorous (1.1.0)
@ -290,7 +290,7 @@ GEM
powerpack (~> 0.0.6) powerpack (~> 0.0.6)
rainbow (>= 1.99.1, < 3.0) rainbow (>= 1.99.1, < 3.0)
ruby-progressbar (~> 1.4) ruby-progressbar (~> 1.4)
ruby-progressbar (1.6.1) ruby-progressbar (1.7.0)
ruby2ruby (2.1.3) ruby2ruby (2.1.3)
ruby_parser (~> 3.1) ruby_parser (~> 3.1)
sexp_processor (~> 4.0) sexp_processor (~> 4.0)
@ -341,7 +341,7 @@ GEM
tilt (1.4.1) tilt (1.4.1)
timers (4.0.1) timers (4.0.1)
hitimes hitimes
tinymce-rails (4.1.5) tinymce-rails (4.1.6)
railties (>= 3.1.1) railties (>= 3.1.1)
tinymce-rails-langs (4.20140129) tinymce-rails-langs (4.20140129)
tinymce-rails (~> 4.0) tinymce-rails (~> 4.0)
@ -393,6 +393,7 @@ DEPENDENCIES
guard-minitest guard-minitest
guard-rubocop guard-rubocop
haml-rails haml-rails
has_scope
http_accept_language http_accept_language
i18n-active_record! i18n-active_record!
jbuilder (~> 2.0) jbuilder (~> 2.0)

View File

@ -29,7 +29,7 @@ end
notification :notifysend notification :notifysend
guard 'brakeman', run_on_start: true, quiet: true, min_confidence: 10 do guard :brakeman, run_on_start: true, quiet: true, min_confidence: 10 do
watch(%r{^app/.+\.(erb|haml|rhtml|rb)$}) watch(%r{^app/.+\.(erb|haml|rhtml|rb)$})
watch(%r{^config/.+\.rb$}) watch(%r{^config/.+\.rb$})
watch(%r{^lib/.+\.rb$}) watch(%r{^lib/.+\.rb$})

View File

@ -29,7 +29,7 @@ ActiveAdmin.register_page 'Dashboard' do
#{link_to(`git rev-parse --short HEAD`, #{link_to(`git rev-parse --short HEAD`,
"https://gitorious.org/agenda-du-libre-rails/agenda-du-libre-rails/commit/ "https://gitorious.org/agenda-du-libre-rails/agenda-du-libre-rails/commit/
#{`git rev-parse HEAD`}")}) #{`git rev-parse HEAD`}")})
.html_safe .html_safe
end end
end end
end end

View File

@ -11,4 +11,11 @@ class ApplicationController < ActionController::Base
I18n.locale = http_accept_language I18n.locale = http_accept_language
.compatible_language_from I18n.available_locales .compatible_language_from I18n.available_locales
end end
protected
# Useful to manage absolute url in mails
def set_mailer_host
ActionMailer::Base.default_url_options[:host] = request.host_with_port
end
end end

View File

@ -1,33 +1,33 @@
# Event life cycle # Event life cycle
# This is a central part to this project # This is a central part to this project
class EventsController < ApplicationController class EventsController < ApplicationController
has_scope :region, :locality, :tag, :daylimit
before_action :set_events, only: [:index] before_action :set_events, only: [:index]
before_action :set_event, only: before_action :set_event, except: [:index, :new, :preview_create, :create]
[:show, :edit, :preview, :update, :cancel, :destroy] before_action :set_create_event, only: [:preview_create, :create]
before_action :check_secret, only: before_action :check_secret, only: [:edit, :preview, :update, :destroy]
[:edit, :preview, :update, :cancel, :destroy] before_action :set_old_event, only: [:update]
before_action :set_mailer_host before_action :set_mailer_host
rescue_from ActiveRecord::StaleObjectError, with: :locked rescue_from ActiveRecord::StaleObjectError, with: :locked
def index def index
respond_to do |format| respond_to do |format|
format.html { render layout: 'iframe' if params[:iframe] } format.html { render layout: 'iframe' if params[:iframe] }
format.rss { @events = @events.future.in params[:daylimit] } format.rss { @events = @events.future }
format.ics { @events = @events.last_year.order :id } format.ics { @events = @events.last_year }
format.xml { @events = @events.includes(:related_region).order :id } format.xml { @events = @events.includes :related_region }
end end
end end
# GET /users/new # GET /users/new
def new def new
@event = Event.new @event = Event.new start_time: Time.now.change(min: 0) + 1.day + 1.hour,
@event.start_time ||= Time.now.change(min: 0) + 1.day + 1.hour end_time: Time.now.change(min: 0) + 1.day + 2.hour
@event.end_time ||= Time.now.change(min: 0) + 1.day + 2.hour
end end
# POST /events/preview # POST /events/preview
def preview_create def preview_create
@event = Event.new event_params
@event.valid? @event.valid?
render action: :new render action: :new
end end
@ -35,8 +35,6 @@ class EventsController < ApplicationController
# POST /events # POST /events
# POST /events.json # POST /events.json
def create def create
@event = Event.new event_params
respond_to do |format| respond_to do |format|
if @event.save && send_creation_mails if @event.save && send_creation_mails
format.html { redirect_to :root, notice: t('.ok') } format.html { redirect_to :root, notice: t('.ok') }
@ -60,7 +58,6 @@ class EventsController < ApplicationController
# PATCH/PUT /events/1 # PATCH/PUT /events/1
# PATCH/PUT /events/1.json # PATCH/PUT /events/1.json
def update def update
@older_event = Event.new @event.attributes
respond_to do |format| respond_to do |format|
if @event.update(event_params) && send_update_mails if @event.update(event_params) && send_update_mails
format.html { redirect_to :root, notice: t('.ok') } format.html { redirect_to :root, notice: t('.ok') }
@ -78,7 +75,7 @@ class EventsController < ApplicationController
def destroy def destroy
@event.destroy @event.destroy
respond_to do |format| respond_to do |format|
format.html { redirect_to events_url, notice: t('.ok') } format.html { redirect_to :root, notice: t('.ok') }
format.json { head :no_content } format.json { head :no_content }
end end
end end
@ -86,10 +83,7 @@ class EventsController < ApplicationController
private private
def set_events def set_events
@events = Event.moderated @events = apply_scopes Event.moderated
@events = @events.region params[:region] if params[:region]
@events = @events.locality params[:locality] if params[:locality]
@events = @events.tag params[:tag] if params[:tag]
end end
# Use callbacks to share common setup or constraints between actions # Use callbacks to share common setup or constraints between actions
@ -102,6 +96,14 @@ class EventsController < ApplicationController
@event = @event.find params[:id] @event = @event.find params[:id]
end end
def set_create_event
@event = Event.new event_params
end
def set_old_event
@older_event = Event.new @event.attributes
end
# Never trust parameters from the scary internet, only allow the white list # Never trust parameters from the scary internet, only allow the white list
# through # through
def event_params def event_params
@ -117,11 +119,6 @@ class EventsController < ApplicationController
unless params[:secret] == @event.secret unless params[:secret] == @event.secret
end end
# Useful to manage absolute url in mails
def set_mailer_host
ActionMailer::Base.default_url_options[:host] = request.host_with_port
end
def send_creation_mails def send_creation_mails
# Send an event creation mail to its author # Send an event creation mail to its author
EventMailer.create(@event).deliver EventMailer.create(@event).deliver

View File

@ -2,16 +2,12 @@
# #
# Access to OSM controls # Access to OSM controls
class MapsController < ApplicationController class MapsController < ApplicationController
has_scope :region, :locality, :tag
def index def index
respond_to do |format| respond_to do |format|
format.html format.html
format.json do format.json { render json: apply_scopes(Event.moderated.future.geo) }
@events = Event.moderated.future.geo
@events = @events.region params[:region] if params[:region]
@events = @events.locality params[:locality] if params[:locality]
@events = @events.tag params[:tag] if params[:tag]
render json: @events
end
end end
end end
end end

View File

@ -3,6 +3,7 @@ class ModerationsController < ApplicationController
before_action :authenticate_user! before_action :authenticate_user!
before_action :set_moderation, :set_mailer_host, only: before_action :set_moderation, :set_mailer_host, only:
[:show, :edit, :preview, :update, :validate, :accept, :refuse, :destroy] [:show, :edit, :preview, :update, :validate, :accept, :refuse, :destroy]
before_action :set_old_mod, only: [:update]
rescue_from ActiveRecord::StaleObjectError, with: :locked rescue_from ActiveRecord::StaleObjectError, with: :locked
def index def index
@ -18,10 +19,9 @@ class ModerationsController < ApplicationController
# PATCH/PUT /moderations/1 # PATCH/PUT /moderations/1
# PATCH/PUT /moderations/1.json # PATCH/PUT /moderations/1.json
def update def update
@older_mod = Event.new @event.attributes
respond_to do |format| respond_to do |format|
if @moderation.update_attributes(moderation_params) && send_mails if @moderation.update_attributes(moderation_params) && send_mails
format.html { redirect_to moderations_url, notice: t('.ok') } format.html { redirect_to :moderations, notice: t('.ok') }
format.json { head :no_content } format.json { head :no_content }
else else
format.html { render action: 'edit' } format.html { render action: 'edit' }
@ -34,28 +34,20 @@ class ModerationsController < ApplicationController
# PATCH/PUT /accept/1 # PATCH/PUT /accept/1
# PATCH/PUT /accept/1.json # PATCH/PUT /accept/1.json
def accept def accept
@moderation.update moderated: true
send_accept_mails
respond_to do |format| respond_to do |format|
if @moderation.update(moderated: true) && send_accept_mails format.html { redirect_to :moderations, notice: t('.ok') }
tweet format.json { head :no_content }
format.html { redirect_to moderations_url, notice: t('.ok') }
format.json { head :no_content }
else
format.html { render action: 'edit' }
# 422 means :unprocessable_entity
format.json { render json: @moderation.errors, status: 422 }
end
end end
end end
# DELETE /events/1 # DELETE /events/1
# DELETE /events/1.json # DELETE /events/1.json
def destroy def destroy
if @moderation.destroy && send_destroy_mails send_destroy_mails if @moderation.destroy
EventMailer.destroy(@moderation, current_user, @reason).deliver
ModerationMailer.destroy(@moderation, current_user, @reason).deliver
end
respond_to do |format| respond_to do |format|
format.html { redirect_to moderations_url, notice: t('.ok') } format.html { redirect_to :moderations, notice: t('.ok') }
format.json { head :no_content } format.json { head :no_content }
end end
end end
@ -68,6 +60,10 @@ class ModerationsController < ApplicationController
@moderation = @event @moderation = @event
end end
def set_old_mod
@older_mod = Event.new @event.attributes
end
# Never trust parameters from the scary internet, only allow the white list # Never trust parameters from the scary internet, only allow the white list
# through. # through.
def moderation_params def moderation_params
@ -88,6 +84,8 @@ class ModerationsController < ApplicationController
end end
def send_accept_mails def send_accept_mails
tweet
# Send an acceptation mail to its author # Send an acceptation mail to its author
EventMailer.accept(@moderation, current_user).deliver EventMailer.accept(@moderation, current_user).deliver
@ -113,6 +111,9 @@ class ModerationsController < ApplicationController
else else
@reason = t "moderations.refuse.reason_#{params[:reason]}_long" @reason = t "moderations.refuse.reason_#{params[:reason]}_long"
end end
EventMailer.destroy(@moderation, current_user, @reason).deliver
ModerationMailer.destroy(@moderation, current_user, @reason).deliver
end end
def locked def locked

View File

@ -1,6 +1,7 @@
# Events, particulary during moderation, can have notes associated to them # Events, particulary during moderation, can have notes associated to them
class NotesController < ApplicationController class NotesController < ApplicationController
before_action :set_event, :set_mailer_host, only: [:new, :create] before_action :set_event, only: [:new, :create]
before_action :create_note, :set_mailer_host, only: [:create]
# GET /moderations/id/new # GET /moderations/id/new
def new def new
@ -8,14 +9,12 @@ class NotesController < ApplicationController
end end
def create def create
@note = @moderation.notes.new note_params.merge author: current_user
respond_to do |format| respond_to do |format|
if @note.save && send_mails if @note.save && send_mails
format.html { redirect_to moderations_url, notice: t('.ok') } format.html { redirect_to moderations_url, notice: t('.ok') }
format.json { render action: :show, status: :created, location: @event } format.json { render action: :show, status: :created, location: @event }
else else
format.html { render action: 'new' } format.html { render action: :new }
format.json { render json: @note.errors, status: :unprocessable_entity } format.json { render json: @note.errors, status: :unprocessable_entity }
end end
end end
@ -29,6 +28,10 @@ class NotesController < ApplicationController
@moderation = @event @moderation = @event
end end
def create_note
@note = @moderation.notes.new note_params.merge author: current_user
end
# Never trust parameters from the scary internet, only allow the white list # Never trust parameters from the scary internet, only allow the white list
# through. # through.
def note_params def note_params

View File

@ -1,32 +1,3 @@
# Manage regions, mostly get stats out of them # Manage regions, mostly get stats out of them
class RegionsController < InheritedResources::Base class RegionsController < InheritedResources::Base
def stats
@region_events = Event.joins(:related_region).group(:name)
.order('count(name) desc').count :name
@city_events = Event.group(:city).having('count(city) > 3')
.order('count(city) desc').count :city
@year_events = Event.group(year_grouping).count
@month_events = Event.group(year_grouping, month_grouping).count
end
private
def year_grouping
if %w(Mysql2 MySQL PostgreSQL).include? Event.connection.adapter_name
'extract(year from start_time)'
elsif Event.connection.adapter_name == 'SQLite'
'strftime("%Y", start_time)'
end
end
def month_grouping
if %w(Mysql2 MySQL PostgreSQL).include? Event.connection.adapter_name
'extract(month from start_time)'
elsif Event.connection.adapter_name == 'SQLite'
'strftime("%m", start_time)'
end
end
end end

View File

@ -0,0 +1,34 @@
# Generate statistics, around events, by date or place
class StatsController < ApplicationController
before_action :set_temporal, :set_local, only: [:index]
private
def set_temporal
@year_events = Event.group(year_grouping).count
@month_events = Event.group(year_grouping, month_grouping).count
end
def set_local
@region_events = Event.joins(:related_region).group(:name)
.order('count(name) desc').count
@city_events = Event.group(:city).having('count(city) > 3')
.order('count(city) desc').count
end
def year_grouping
if %w(Mysql2 MySQL PostgreSQL).include? Event.connection.adapter_name
'extract(year from start_time)'
elsif Event.connection.adapter_name == 'SQLite'
'strftime("%Y", start_time)'
end
end
def month_grouping
if %w(Mysql2 MySQL PostgreSQL).include? Event.connection.adapter_name
'extract(month from start_time)'
elsif Event.connection.adapter_name == 'SQLite'
'strftime("%m", start_time)'
end
end
end

View File

@ -2,15 +2,15 @@
class TagsController < InheritedResources::Base class TagsController < InheritedResources::Base
def index def index
@tags = Event @tags = Event
.pluck(:tags).map(&:split).flatten .pluck(:tags).map(&:split).flatten
.group_by { |i| i } .group_by { |i| i }
.map { |k, v| [k, v.size] } .map { |k, v| [k, v.size] }
.reject { |_k, v| v <= 3 } .reject { |_k, v| v <= 3 }
.sort .sort
respond_to do |format| respond_to do |format|
format.html format.html
format.json { render json: @tags.to_json } format.json { render json: @tags }
end end
end end

View File

@ -26,17 +26,25 @@ module EventsHelper
def display_date(event = @event) def display_date(event = @event)
if event.start_time.to_date == event.end_time.to_date if event.start_time.to_date == event.end_time.to_date
t 'date.formats.same_day', display_sameday event
date: l(event.start_time.to_date, format: :long),
start: l(event.start_time, format: :hours),
end: l(event.end_time, format: :hours)
else else
t 'date.formats.period', display_multi_days event
start: l(event.start_time, format: :at),
end: l(event.end_time, format: :at)
end end
end end
def display_sameday(event)
t 'date.formats.same_day',
date: l(event.start_time.to_date, format: :long),
start: l(event.start_time, format: :hours),
end: l(event.end_time, format: :hours)
end
def display_multi_days(event)
t 'date.formats.period',
start: l(event.start_time, format: :at),
end: l(event.end_time, format: :at)
end
def wrap(s, width = 78) def wrap(s, width = 78)
s.gsub(/(.{1,#{width}})(\s+|\Z)/, "\\1\n") s.gsub(/(.{1,#{width}})(\s+|\Z)/, "\\1\n")
end end

View File

@ -29,7 +29,7 @@ class Event < ActiveRecord::Base
scope :last_year, -> { where '? <= end_time', 1.year.ago } scope :last_year, -> { where '? <= end_time', 1.year.ago }
scope :past, -> { where 'start_time <= ?', DateTime.now } scope :past, -> { where 'start_time <= ?', DateTime.now }
scope :future, -> { where '? <= end_time', DateTime.now } scope :future, -> { where '? <= end_time', DateTime.now }
scope :in, -> days { where 'end_time <= ?', (days || 30).to_i.days.from_now } scope :daylimit, -> d { where 'end_time <= ?', (d || 30).to_i.days.from_now }
scope :year, (lambda do |year| scope :year, (lambda do |year|
where '? <= end_time and start_time <= ?', where '? <= end_time and start_time <= ?',
Date.new(year, 1, 1).beginning_of_week, Date.new(year, 1, 1).beginning_of_week,

View File

@ -57,7 +57,7 @@
= link_to application_infos_path do = link_to application_infos_path do
%em.fa.fa-info %em.fa.fa-info
=t '.infos' =t '.infos'
= link_to stats_regions_path do = link_to stats_path do
%em.fa.fa-signal %em.fa.fa-signal
=t '.stats' =t '.stats'
= link_to application_contact_path do = link_to application_contact_path do

View File

@ -138,7 +138,8 @@ it more readable or agreable.
Example: `%{tag}` Example: `%{tag}`
\n* You can modify the 30 days limit with the parameter `daylimit`. \n \n* You can modify the 30 days limit with the parameter `daylimit`. \n
Example: `%{daylimit}`" Example: `%{daylimit}`"
stats: stats:
index:
title: Statistics title: Statistics
all: Validated events all: Validated events
allModeration: Events waiting for validation allModeration: Events waiting for validation

View File

@ -136,7 +136,8 @@ fr:
* Vous pouvez modifier la limite des 30 prochains jours des flux en * Vous pouvez modifier la limite des 30 prochains jours des flux en
utilisant le paramètre `daylimit`. \n utilisant le paramètre `daylimit`. \n
Exemple: `%{daylimit}`" Exemple: `%{daylimit}`"
stats: stats:
index:
title: Statistiques title: Statistiques
all: Événements validés all: Événements validés
allModeration: Événements en cours de modération allModeration: Événements en cours de modération

View File

@ -2,6 +2,7 @@ Rails.application.routes.draw do
get 'application/infos' get 'application/infos'
get 'application/contact' get 'application/contact'
get 'application/rules' get 'application/rules'
get 'stats', to: 'stats#index'
resources :users resources :users
resources :events do resources :events do
@ -15,9 +16,7 @@ Rails.application.routes.draw do
get :validate, :refuse, on: :member get :validate, :refuse, on: :member
put :accept, on: :member put :accept, on: :member
end end
resources :regions, only: [:index] do resources :regions, only: [:index]
get 'stats', on: :collection
end
resources :tags, only: [:index, :show] resources :tags, only: [:index, :show]
resources :maps, only: [:index] resources :maps, only: [:index]
resources :lugs, only: [:index, :show] resources :lugs, only: [:index, :show]

View File

@ -29,7 +29,7 @@ if File.file? 'Rakefile'
# precompile assets # precompile assets
changed_assets = `git diff #{oldrev} #{newrev} --name-only -z app/assets` changed_assets = `git diff #{oldrev} #{newrev} --name-only -z app/assets`
.split("\0") .split("\0")
tasks << 'assets:precompile' if changed_assets.size > 0 tasks << 'assets:precompile' if changed_assets.size > 0
run "#{rake_cmd} #{tasks.join(' ')} RAILS_ENV=#{RAILS_ENV}" if tasks.any? run "#{rake_cmd} #{tasks.join(' ')} RAILS_ENV=#{RAILS_ENV}" if tasks.any?

View File

@ -119,6 +119,7 @@
promise: 'es6', promise: 'es6',
URL: 'url' URL: 'url'
}; };
var supportCapture = 'capture' in create('input');
clearInterval(webshims.timer); clearInterval(webshims.timer);
support.advancedObjectProperties = support.objectAccessor = support.ES5 = !!('create' in Object && 'seal' in Object); support.advancedObjectProperties = support.objectAccessor = support.ES5 = !!('create' in Object && 'seal' in Object);
@ -136,7 +137,7 @@
} }
$.extend(webshims, { $.extend(webshims, {
version: '1.15.3', version: '1.15.4',
cfg: { cfg: {
enhanceAuto: window.Audio && (!window.matchMedia || matchMedia('(min-device-width: 721px)').matches), enhanceAuto: window.Audio && (!window.matchMedia || matchMedia('(min-device-width: 721px)').matches),
@ -212,11 +213,13 @@
})(), })(),
_polyfill: function(features){ _polyfill: function(features){
var toLoadFeatures = []; var toLoadFeatures = [];
var hasFormsExt; var hasFormsExt, needExtStyles;
if(!firstRun.run){ if(!firstRun.run){
hasFormsExt = $.inArray('forms-ext', features) !== -1; hasFormsExt = $.inArray('forms-ext', features) !== -1;
firstRun(); firstRun();
needExtStyles = (hasFormsExt && !modules["form-number-date-ui"].test()) || (!supportCapture && $.inArray('mediacapture', features) !== -1);
if(hasFormsExt && $.inArray('forms', features) == -1){ if(hasFormsExt && $.inArray('forms', features) == -1){
features.push('forms'); features.push('forms');
if(WSDEBUG){ if(WSDEBUG){
@ -224,7 +227,7 @@
} }
} }
if(webCFG.loadStyles){ if(webCFG.loadStyles){
loader.loadCSS('styles/shim'+((hasFormsExt && !modules["form-number-date-ui"].test()) ? '-ext' : '')+'.css'); loader.loadCSS('styles/shim'+(needExtStyles ? '-ext' : '')+'.css');
} }
} }
@ -922,7 +925,7 @@
//<picture //<picture
create('picture'); create('picture');
addPolyfill('picture', { addPolyfill('picture', {
test: ('picturefill' in window) || !!window.HTMLPictureElement, test: ('picturefill' in window) || !!window.HTMLPictureElement || ('respimage' in window),
d: ['matchMedia'], d: ['matchMedia'],
c: [18], c: [18],
loadInit: function(){ loadInit: function(){
@ -964,22 +967,6 @@
}); });
//> //>
//<usermedia
var userMediaTest = ('getUserMedia' in navigator);
addPolyfill('usermedia-core', {
f: 'usermedia',
test: userMediaTest && window.URL,
d: ['url', DOMSUPPORT]
});
addPolyfill('usermedia-shim', {
f: 'usermedia',
test: !!(userMediaTest || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia),
d: ['url', 'mediaelement', DOMSUPPORT]
});
//>
//<canvas //<canvas
(function(){ (function(){
addPolyfill('canvas', { addPolyfill('canvas', {
@ -1001,6 +988,30 @@
//> //>
//<usermedia
var userMediaTest = ('getUserMedia' in navigator);
addPolyfill('usermedia-core', {
f: 'usermedia',
test: userMediaTest && window.URL,
d: ['url', DOMSUPPORT]
});
addPolyfill('usermedia-shim', {
f: 'usermedia',
test: !!(userMediaTest || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia),
d: ['url', 'mediaelement', DOMSUPPORT]
});
//>
//<mediacapture
addPolyfill('mediacapture', {
test: supportCapture,
d: ['swfmini', 'usermedia', DOMSUPPORT, 'filereader', 'forms', 'canvas']
});
//>
//<forms //<forms
(function(){ (function(){
var formExtend, formOptions; var formExtend, formOptions;
@ -1086,7 +1097,7 @@
webshims.validationMessages = webshims.validityMessages = { webshims.validationMessages = webshims.validityMessages = {
langSrc: 'i18n/formcfg-', langSrc: 'i18n/formcfg-',
availableLangs: "ar cs el es fa fr he hi hu it ja lt nl pl pt pt-BR pt-PT ru sv zh-CN zh-TW".split(' ') availableLangs: "ar ca cs el es fa fr he hi hu it ja lt nl pl pt pt-BR pt-PT ru sv zh-CN zh-TW".split(' ')
}; };
webshims.formcfg = $.extend({}, webshims.validationMessages); webshims.formcfg = $.extend({}, webshims.validationMessages);
@ -1244,15 +1255,6 @@
}); });
//> //>
/*
//<mediacapture
addPolyfill('mediacapture', {
test: 'capture' in create('input'),
d: ['swfmini', 'usermedia', DOMSUPPORT, 'filereader', 'forms', 'canvas']
});
//>
*/
//<details //<details
addPolyfill('details', { addPolyfill('details', {
test: ('open' in create('details')), test: ('open' in create('details')),

View File

@ -85,13 +85,7 @@
}; };
} }
} }
if (typeof define === 'function' && define.amd) { window.dataURLtoBlob = dataURLtoBlob;
define(function () {
return dataURLtoBlob;
});
} else {
window.dataURLtoBlob = dataURLtoBlob;
}
}(this)); }(this));
webshim.isReady('canvas-blob', true); webshim.isReady('canvas-blob', true);

View File

@ -479,6 +479,8 @@ webshims.isReady('swfmini', true);
} }
return message || ''; return message || '';
}; };
webshims.refreshCustomValidityRules = $.noop;
$.fn.getErrorMessage = function(key){ $.fn.getErrorMessage = function(key){
var message = ''; var message = '';

View File

@ -102,20 +102,25 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
}; };
//jquery mobile and jquery ui //jquery mobile and jquery ui
if(!$.widget){ if(!$.widget && (!$.pluginFactory || !$.pluginFactory.mixin)){
(function(){ (function(){
var _cleanData = $.cleanData; var _cleanData = $.cleanData;
$.cleanData = function( elems ) { $.cleanData = (function( orig ) {
if(!$.widget){ return function( elems ) {
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { var events, elem, i;
for ( i = 0; (elem = elems[i]) != null; i++ ) {
try { try {
$( elem ).triggerHandler( "remove" ); // Only trigger remove when necessary to save time
// http://bugs.jquery.com/ticket/8235 events = $._data( elem, "events" );
} catch( e ) {} if ( events && events.remove ) {
$( elem ).triggerHandler( "remove" );
}
// http://bugs.jquery.com/ticket/8235
} catch ( e ) {}
} }
} orig( elems );
_cleanData( elems ); };
}; })( $.cleanData );
})(); })();
} }
@ -536,7 +541,7 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
return id; return id;
}; };
})(), })(),
domPrefixes: ["ws", "webkit", "moz", "ms", "o"], domPrefixes: ["webkit", "moz", "ms", "o", "ws"],
prefixed: function (prop, obj){ prefixed: function (prop, obj){
var i, testProp; var i, testProp;
@ -2275,9 +2280,13 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
}, },
time: function(val, o, noCorrect){ time: function(val, o, noCorrect){
var fVal, i; var fVal, i;
if(val){ if(val){
val = val.split(':'); val = val.split(':');
if(val.length != 2 || isNaN(parseInt(val[0] || '', 10)) || isNaN(parseInt(val[1] || '', 10))){
return val.join(':');
}
if(curCfg.meridian){ if(curCfg.meridian){
fVal = (val[0] * 1); fVal = (val[0] * 1);
if(fVal && fVal >= 12){ if(fVal && fVal >= 12){
@ -2432,6 +2441,7 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
createFormat('d'); createFormat('d');
var tmp, obj; var tmp, obj;
var ret = ''; var ret = '';
if(opts.splitInput){ if(opts.splitInput){
obj = {yy: 0, mm: 1, dd: 2}; obj = {yy: 0, mm: 1, dd: 2};
} else { } else {
@ -2453,8 +2463,7 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
} }
ret = ([addZero(val[obj.yy]), addZero(val[obj.mm]), addZero(val[obj.dd])]).join('-'); ret = ([addZero(val[obj.yy]), addZero(val[obj.mm]), addZero(val[obj.dd])]).join('-');
} }
return ret return ret;
;
}, },
color: function(val, opts){ color: function(val, opts){
var ret = '#000000'; var ret = '#000000';
@ -2756,9 +2765,11 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
}; };
['defaultValue', 'value'].forEach(function(name){ ['defaultValue', 'value'].forEach(function(name){
var formatName = 'format'+name;
wsWidgetProto[name] = function(val, force){ wsWidgetProto[name] = function(val, force){
if(!this._init || force || val !== this.options[name]){ if(!this._init || force || val !== this.options[name] || this.options[formatName] != this.element.prop(name)){
this.element.prop(name, this.formatValue(val)); this.options[formatName] = this.formatValue(val);
this.element.prop(name, this.options[formatName]);
this.options[name] = val; this.options[name] = val;
this._propertyChange(name); this._propertyChange(name);
this.mirrorValidity(); this.mirrorValidity();
@ -2882,36 +2893,34 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
var isValue = name == 'value'; var isValue = name == 'value';
spinBtnProto[name] = function(val, force, isLive){ spinBtnProto[name] = function(val, force, isLive){
var selectionEnd; var selectionEnd;
if(!this._init || force || this.options[name] !== val){ if(isValue){
if(isValue){ this._beforeValue(val);
this._beforeValue(val); } else {
} else { this.elemHelper.prop(name, val);
this.elemHelper.prop(name, val);
}
val = formatVal[this.type](val, this.options);
if(this.options.splitInput){
$.each(this.splits, function(i, elem){
var setOption;
if(!(name in elem) && !isValue && $.nodeName(elem, 'select')){
$('option[value="'+ val[i] +'"]', elem).prop('defaultSelected', true);
} else {
$.prop(elem, name, val[i]);
}
});
} else {
val = this.toFixed(val);
if(isLive && this._getSelectionEnd){
selectionEnd = this._getSelectionEnd(val);
}
this.element.prop(name, val);
if(selectionEnd != null){
this.element.prop('selectionEnd', selectionEnd);
}
}
this._propertyChange(name);
this.mirrorValidity();
} }
val = formatVal[this.type](val, this.options);
if(this.options.splitInput){
$.each(this.splits, function(i, elem){
var setOption;
if(!(name in elem) && !isValue && $.nodeName(elem, 'select')){
$('option[value="'+ val[i] +'"]', elem).prop('defaultSelected', true);
} else {
$.prop(elem, name, val[i]);
}
});
} else {
val = this.toFixed(val);
if(isLive && this._getSelectionEnd){
selectionEnd = this._getSelectionEnd(val);
}
this.element.prop(name, val);
if(selectionEnd != null){
this.element.prop('selectionEnd', selectionEnd);
}
}
this._propertyChange(name);
this.mirrorValidity();
}; };
}); });

View File

@ -1044,9 +1044,13 @@
}, },
time: function(val, o, noCorrect){ time: function(val, o, noCorrect){
var fVal, i; var fVal, i;
if(val){ if(val){
val = val.split(':'); val = val.split(':');
if(val.length != 2 || isNaN(parseInt(val[0] || '', 10)) || isNaN(parseInt(val[1] || '', 10))){
return val.join(':');
}
if(curCfg.meridian){ if(curCfg.meridian){
fVal = (val[0] * 1); fVal = (val[0] * 1);
if(fVal && fVal >= 12){ if(fVal && fVal >= 12){
@ -1201,6 +1205,7 @@
createFormat('d'); createFormat('d');
var tmp, obj; var tmp, obj;
var ret = ''; var ret = '';
if(opts.splitInput){ if(opts.splitInput){
obj = {yy: 0, mm: 1, dd: 2}; obj = {yy: 0, mm: 1, dd: 2};
} else { } else {
@ -1222,8 +1227,7 @@
} }
ret = ([addZero(val[obj.yy]), addZero(val[obj.mm]), addZero(val[obj.dd])]).join('-'); ret = ([addZero(val[obj.yy]), addZero(val[obj.mm]), addZero(val[obj.dd])]).join('-');
} }
return ret return ret;
;
}, },
color: function(val, opts){ color: function(val, opts){
var ret = '#000000'; var ret = '#000000';
@ -1525,9 +1529,11 @@
}; };
['defaultValue', 'value'].forEach(function(name){ ['defaultValue', 'value'].forEach(function(name){
var formatName = 'format'+name;
wsWidgetProto[name] = function(val, force){ wsWidgetProto[name] = function(val, force){
if(!this._init || force || val !== this.options[name]){ if(!this._init || force || val !== this.options[name] || this.options[formatName] != this.element.prop(name)){
this.element.prop(name, this.formatValue(val)); this.options[formatName] = this.formatValue(val);
this.element.prop(name, this.options[formatName]);
this.options[name] = val; this.options[name] = val;
this._propertyChange(name); this._propertyChange(name);
this.mirrorValidity(); this.mirrorValidity();
@ -1651,36 +1657,34 @@
var isValue = name == 'value'; var isValue = name == 'value';
spinBtnProto[name] = function(val, force, isLive){ spinBtnProto[name] = function(val, force, isLive){
var selectionEnd; var selectionEnd;
if(!this._init || force || this.options[name] !== val){ if(isValue){
if(isValue){ this._beforeValue(val);
this._beforeValue(val); } else {
} else { this.elemHelper.prop(name, val);
this.elemHelper.prop(name, val);
}
val = formatVal[this.type](val, this.options);
if(this.options.splitInput){
$.each(this.splits, function(i, elem){
var setOption;
if(!(name in elem) && !isValue && $.nodeName(elem, 'select')){
$('option[value="'+ val[i] +'"]', elem).prop('defaultSelected', true);
} else {
$.prop(elem, name, val[i]);
}
});
} else {
val = this.toFixed(val);
if(isLive && this._getSelectionEnd){
selectionEnd = this._getSelectionEnd(val);
}
this.element.prop(name, val);
if(selectionEnd != null){
this.element.prop('selectionEnd', selectionEnd);
}
}
this._propertyChange(name);
this.mirrorValidity();
} }
val = formatVal[this.type](val, this.options);
if(this.options.splitInput){
$.each(this.splits, function(i, elem){
var setOption;
if(!(name in elem) && !isValue && $.nodeName(elem, 'select')){
$('option[value="'+ val[i] +'"]', elem).prop('defaultSelected', true);
} else {
$.prop(elem, name, val[i]);
}
});
} else {
val = this.toFixed(val);
if(isLive && this._getSelectionEnd){
selectionEnd = this._getSelectionEnd(val);
}
this.element.prop(name, val);
if(selectionEnd != null){
this.element.prop('selectionEnd', selectionEnd);
}
}
this._propertyChange(name);
this.mirrorValidity();
}; };
}); });

View File

@ -893,10 +893,11 @@ webshims.register('mediaelement-core', function($, webshims, window, document, u
var copyName = {srclang: 'language'}; var copyName = {srclang: 'language'};
var updateMediaTrackList = function(baseData, trackList){ var updateMediaTrackList = function(baseData, trackList){
var i, len;
var callChange = false;
var removed = []; var removed = [];
var added = []; var added = [];
var newTracks = []; var newTracks = [];
var i, len;
if(!baseData){ if(!baseData){
baseData = webshims.data(this, 'mediaelementBase') || webshims.data(this, 'mediaelementBase', {}); baseData = webshims.data(this, 'mediaelementBase') || webshims.data(this, 'mediaelementBase', {});
} }
@ -931,12 +932,13 @@ webshims.register('mediaelement-core', function($, webshims, window, document, u
removed.push(trackList[i]); removed.push(trackList[i]);
} }
} }
if(removed.length || added.length){ if(removed.length || added.length){
trackList.splice(0); trackList.splice(0);
for(i = 0, len = newTracks.length; i < len; i++){ for(i = 0, len = newTracks.length; i < len; i++){
trackList.push(newTracks[i]); trackList.push(newTracks[i]);
} }
for(i = 0, len = removed.length; i < len; i++){ for(i = 0, len = removed.length; i < len; i++){
$([trackList]).triggerHandler($.Event({type: 'removetrack', track: removed[i]})); $([trackList]).triggerHandler($.Event({type: 'removetrack', track: removed[i]}));
@ -949,6 +951,16 @@ webshims.register('mediaelement-core', function($, webshims, window, document, u
$(this).triggerHandler('updatetrackdisplay'); $(this).triggerHandler('updatetrackdisplay');
} }
} }
for(i = 0, len = trackList.length; i < len; i++){
if(trackList[i].__wsmode != trackList[i].mode){
trackList[i].__wsmode = trackList[i].mode;
callChange = true;
}
}
if(callChange){
$([trackList]).triggerHandler('change');
}
}; };
var refreshTrack = function(track, trackData){ var refreshTrack = function(track, trackData){

View File

@ -670,10 +670,11 @@ webshims.register('mediaelement-core', function($, webshims, window, document, u
var copyName = {srclang: 'language'}; var copyName = {srclang: 'language'};
var updateMediaTrackList = function(baseData, trackList){ var updateMediaTrackList = function(baseData, trackList){
var i, len;
var callChange = false;
var removed = []; var removed = [];
var added = []; var added = [];
var newTracks = []; var newTracks = [];
var i, len;
if(!baseData){ if(!baseData){
baseData = webshims.data(this, 'mediaelementBase') || webshims.data(this, 'mediaelementBase', {}); baseData = webshims.data(this, 'mediaelementBase') || webshims.data(this, 'mediaelementBase', {});
} }
@ -708,12 +709,13 @@ webshims.register('mediaelement-core', function($, webshims, window, document, u
removed.push(trackList[i]); removed.push(trackList[i]);
} }
} }
if(removed.length || added.length){ if(removed.length || added.length){
trackList.splice(0); trackList.splice(0);
for(i = 0, len = newTracks.length; i < len; i++){ for(i = 0, len = newTracks.length; i < len; i++){
trackList.push(newTracks[i]); trackList.push(newTracks[i]);
} }
for(i = 0, len = removed.length; i < len; i++){ for(i = 0, len = removed.length; i < len; i++){
$([trackList]).triggerHandler($.Event({type: 'removetrack', track: removed[i]})); $([trackList]).triggerHandler($.Event({type: 'removetrack', track: removed[i]}));
@ -726,6 +728,16 @@ webshims.register('mediaelement-core', function($, webshims, window, document, u
$(this).triggerHandler('updatetrackdisplay'); $(this).triggerHandler('updatetrackdisplay');
} }
} }
for(i = 0, len = trackList.length; i < len; i++){
if(trackList[i].__wsmode != trackList[i].mode){
trackList[i].__wsmode = trackList[i].mode;
callChange = true;
}
}
if(callChange){
$([trackList]).triggerHandler('change');
}
}; };
var refreshTrack = function(track, trackData){ var refreshTrack = function(track, trackData){

View File

@ -102,20 +102,25 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
}; };
//jquery mobile and jquery ui //jquery mobile and jquery ui
if(!$.widget){ if(!$.widget && (!$.pluginFactory || !$.pluginFactory.mixin)){
(function(){ (function(){
var _cleanData = $.cleanData; var _cleanData = $.cleanData;
$.cleanData = function( elems ) { $.cleanData = (function( orig ) {
if(!$.widget){ return function( elems ) {
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { var events, elem, i;
for ( i = 0; (elem = elems[i]) != null; i++ ) {
try { try {
$( elem ).triggerHandler( "remove" ); // Only trigger remove when necessary to save time
// http://bugs.jquery.com/ticket/8235 events = $._data( elem, "events" );
} catch( e ) {} if ( events && events.remove ) {
$( elem ).triggerHandler( "remove" );
}
// http://bugs.jquery.com/ticket/8235
} catch ( e ) {}
} }
} orig( elems );
_cleanData( elems ); };
}; })( $.cleanData );
})(); })();
} }
@ -536,7 +541,7 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
return id; return id;
}; };
})(), })(),
domPrefixes: ["ws", "webkit", "moz", "ms", "o"], domPrefixes: ["webkit", "moz", "ms", "o", "ws"],
prefixed: function (prop, obj){ prefixed: function (prop, obj){
var i, testProp; var i, testProp;
@ -1487,6 +1492,8 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
} }
return message || ''; return message || '';
}; };
webshims.refreshCustomValidityRules = $.noop;
$.fn.getErrorMessage = function(key){ $.fn.getErrorMessage = function(key){
var message = ''; var message = '';
@ -2149,22 +2156,25 @@ if(webshims.support.inputtypes.date && /webkit/i.test(navigator.userAgent)){
webshims.addReady(function(context, contextElem){ webshims.addReady(function(context, contextElem){
//start constrain-validation //start constrain-validation
var focusElem;
$('form', context) $('form', context)
.add(contextElem.filter('form')) .add(contextElem.filter('form'))
.on('invalid', $.noop) .on('invalid', $.noop)
; ;
try { setTimeout(function(){
if(context == document && !('form' in (document.activeElement || {}))) { var focusElem;
focusElem = $(context.querySelector('input[autofocus], select[autofocus], textarea[autofocus]')).eq(0).getShadowFocusElement()[0]; try {
if (focusElem && focusElem.offsetHeight && focusElem.offsetWidth) { if(!('form' in (document.activeElement || {}))) {
focusElem.focus(); focusElem = $(context.querySelector('input[autofocus], select[autofocus], textarea[autofocus]')).eq(0).getShadowFocusElement()[0];
if (focusElem && (focusElem.offsetHeight || focusElem.offsetWidth)) {
focusElem.focus();
}
} }
} }
} catch (er) {}
catch (er) {} }, 9);
}); });
if(!webshims.support.datalist){ if(!webshims.support.datalist){

View File

@ -325,20 +325,25 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
}; };
//jquery mobile and jquery ui //jquery mobile and jquery ui
if(!$.widget){ if(!$.widget && (!$.pluginFactory || !$.pluginFactory.mixin)){
(function(){ (function(){
var _cleanData = $.cleanData; var _cleanData = $.cleanData;
$.cleanData = function( elems ) { $.cleanData = (function( orig ) {
if(!$.widget){ return function( elems ) {
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { var events, elem, i;
for ( i = 0; (elem = elems[i]) != null; i++ ) {
try { try {
$( elem ).triggerHandler( "remove" ); // Only trigger remove when necessary to save time
// http://bugs.jquery.com/ticket/8235 events = $._data( elem, "events" );
} catch( e ) {} if ( events && events.remove ) {
$( elem ).triggerHandler( "remove" );
}
// http://bugs.jquery.com/ticket/8235
} catch ( e ) {}
} }
} orig( elems );
_cleanData( elems ); };
}; })( $.cleanData );
})(); })();
} }
@ -759,7 +764,7 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
return id; return id;
}; };
})(), })(),
domPrefixes: ["ws", "webkit", "moz", "ms", "o"], domPrefixes: ["webkit", "moz", "ms", "o", "ws"],
prefixed: function (prop, obj){ prefixed: function (prop, obj){
var i, testProp; var i, testProp;
@ -1710,6 +1715,8 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
} }
return message || ''; return message || '';
}; };
webshims.refreshCustomValidityRules = $.noop;
$.fn.getErrorMessage = function(key){ $.fn.getErrorMessage = function(key){
var message = ''; var message = '';
@ -2372,22 +2379,25 @@ if(webshims.support.inputtypes.date && /webkit/i.test(navigator.userAgent)){
webshims.addReady(function(context, contextElem){ webshims.addReady(function(context, contextElem){
//start constrain-validation //start constrain-validation
var focusElem;
$('form', context) $('form', context)
.add(contextElem.filter('form')) .add(contextElem.filter('form'))
.on('invalid', $.noop) .on('invalid', $.noop)
; ;
try { setTimeout(function(){
if(context == document && !('form' in (document.activeElement || {}))) { var focusElem;
focusElem = $(context.querySelector('input[autofocus], select[autofocus], textarea[autofocus]')).eq(0).getShadowFocusElement()[0]; try {
if (focusElem && focusElem.offsetHeight && focusElem.offsetWidth) { if(!('form' in (document.activeElement || {}))) {
focusElem.focus(); focusElem = $(context.querySelector('input[autofocus], select[autofocus], textarea[autofocus]')).eq(0).getShadowFocusElement()[0];
if (focusElem && (focusElem.offsetHeight || focusElem.offsetWidth)) {
focusElem.focus();
}
} }
} }
} catch (er) {}
catch (er) {} }, 9);
}); });
if(!webshims.support.datalist){ if(!webshims.support.datalist){

View File

@ -1660,9 +1660,13 @@ webshims.register('form-number-date-api', function($, webshims, window, document
}, },
time: function(val, o, noCorrect){ time: function(val, o, noCorrect){
var fVal, i; var fVal, i;
if(val){ if(val){
val = val.split(':'); val = val.split(':');
if(val.length != 2 || isNaN(parseInt(val[0] || '', 10)) || isNaN(parseInt(val[1] || '', 10))){
return val.join(':');
}
if(curCfg.meridian){ if(curCfg.meridian){
fVal = (val[0] * 1); fVal = (val[0] * 1);
if(fVal && fVal >= 12){ if(fVal && fVal >= 12){
@ -1817,6 +1821,7 @@ webshims.register('form-number-date-api', function($, webshims, window, document
createFormat('d'); createFormat('d');
var tmp, obj; var tmp, obj;
var ret = ''; var ret = '';
if(opts.splitInput){ if(opts.splitInput){
obj = {yy: 0, mm: 1, dd: 2}; obj = {yy: 0, mm: 1, dd: 2};
} else { } else {
@ -1838,8 +1843,7 @@ webshims.register('form-number-date-api', function($, webshims, window, document
} }
ret = ([addZero(val[obj.yy]), addZero(val[obj.mm]), addZero(val[obj.dd])]).join('-'); ret = ([addZero(val[obj.yy]), addZero(val[obj.mm]), addZero(val[obj.dd])]).join('-');
} }
return ret return ret;
;
}, },
color: function(val, opts){ color: function(val, opts){
var ret = '#000000'; var ret = '#000000';
@ -2141,9 +2145,11 @@ webshims.register('form-number-date-api', function($, webshims, window, document
}; };
['defaultValue', 'value'].forEach(function(name){ ['defaultValue', 'value'].forEach(function(name){
var formatName = 'format'+name;
wsWidgetProto[name] = function(val, force){ wsWidgetProto[name] = function(val, force){
if(!this._init || force || val !== this.options[name]){ if(!this._init || force || val !== this.options[name] || this.options[formatName] != this.element.prop(name)){
this.element.prop(name, this.formatValue(val)); this.options[formatName] = this.formatValue(val);
this.element.prop(name, this.options[formatName]);
this.options[name] = val; this.options[name] = val;
this._propertyChange(name); this._propertyChange(name);
this.mirrorValidity(); this.mirrorValidity();
@ -2267,36 +2273,34 @@ webshims.register('form-number-date-api', function($, webshims, window, document
var isValue = name == 'value'; var isValue = name == 'value';
spinBtnProto[name] = function(val, force, isLive){ spinBtnProto[name] = function(val, force, isLive){
var selectionEnd; var selectionEnd;
if(!this._init || force || this.options[name] !== val){ if(isValue){
if(isValue){ this._beforeValue(val);
this._beforeValue(val); } else {
} else { this.elemHelper.prop(name, val);
this.elemHelper.prop(name, val);
}
val = formatVal[this.type](val, this.options);
if(this.options.splitInput){
$.each(this.splits, function(i, elem){
var setOption;
if(!(name in elem) && !isValue && $.nodeName(elem, 'select')){
$('option[value="'+ val[i] +'"]', elem).prop('defaultSelected', true);
} else {
$.prop(elem, name, val[i]);
}
});
} else {
val = this.toFixed(val);
if(isLive && this._getSelectionEnd){
selectionEnd = this._getSelectionEnd(val);
}
this.element.prop(name, val);
if(selectionEnd != null){
this.element.prop('selectionEnd', selectionEnd);
}
}
this._propertyChange(name);
this.mirrorValidity();
} }
val = formatVal[this.type](val, this.options);
if(this.options.splitInput){
$.each(this.splits, function(i, elem){
var setOption;
if(!(name in elem) && !isValue && $.nodeName(elem, 'select')){
$('option[value="'+ val[i] +'"]', elem).prop('defaultSelected', true);
} else {
$.prop(elem, name, val[i]);
}
});
} else {
val = this.toFixed(val);
if(isLive && this._getSelectionEnd){
selectionEnd = this._getSelectionEnd(val);
}
this.element.prop(name, val);
if(selectionEnd != null){
this.element.prop('selectionEnd', selectionEnd);
}
}
this._propertyChange(name);
this.mirrorValidity();
}; };
}); });

File diff suppressed because it is too large Load Diff

View File

@ -325,20 +325,25 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
}; };
//jquery mobile and jquery ui //jquery mobile and jquery ui
if(!$.widget){ if(!$.widget && (!$.pluginFactory || !$.pluginFactory.mixin)){
(function(){ (function(){
var _cleanData = $.cleanData; var _cleanData = $.cleanData;
$.cleanData = function( elems ) { $.cleanData = (function( orig ) {
if(!$.widget){ return function( elems ) {
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { var events, elem, i;
for ( i = 0; (elem = elems[i]) != null; i++ ) {
try { try {
$( elem ).triggerHandler( "remove" ); // Only trigger remove when necessary to save time
// http://bugs.jquery.com/ticket/8235 events = $._data( elem, "events" );
} catch( e ) {} if ( events && events.remove ) {
$( elem ).triggerHandler( "remove" );
}
// http://bugs.jquery.com/ticket/8235
} catch ( e ) {}
} }
} orig( elems );
_cleanData( elems ); };
}; })( $.cleanData );
})(); })();
} }
@ -759,7 +764,7 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
return id; return id;
}; };
})(), })(),
domPrefixes: ["ws", "webkit", "moz", "ms", "o"], domPrefixes: ["webkit", "moz", "ms", "o", "ws"],
prefixed: function (prop, obj){ prefixed: function (prop, obj){
var i, testProp; var i, testProp;
@ -1710,6 +1715,8 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
} }
return message || ''; return message || '';
}; };
webshims.refreshCustomValidityRules = $.noop;
$.fn.getErrorMessage = function(key){ $.fn.getErrorMessage = function(key){
var message = ''; var message = '';

View File

@ -1463,6 +1463,25 @@
VIDEO: 1 VIDEO: 1
}; };
var tested = {}; var tested = {};
var addToBlob = function(){
var desc = webshim.defineNodeNameProperty('canvas', 'toBlob', {
prop: {
value: function(){
var context = $(this).callProp('getContext', ['2d']);
var that = this;
var args = arguments;
var cb = function(){
return desc.prop._supvalue.apply(that, args);
};
if(context.wsImageComplete && context._wsIsLoading){
context.wsImageComplete(cb);
} else {
return cb();
}
}
}
});
};
if(!_drawImage){ if(!_drawImage){
webshim.error('canvas.drawImage feature is needed. In IE8 flashvanvas pro can be used'); webshim.error('canvas.drawImage feature is needed. In IE8 flashvanvas pro can be used');
@ -1537,6 +1556,12 @@
} }
return _drawImage.apply(this, arguments); return _drawImage.apply(this, arguments);
}; };
if(!document.createElement('canvas').toBlob){
webshims.ready('filereader', addToBlob);
} else {
addToBlob();
}
return true; return true;
}; };
@ -1810,10 +1835,11 @@
var copyName = {srclang: 'language'}; var copyName = {srclang: 'language'};
var updateMediaTrackList = function(baseData, trackList){ var updateMediaTrackList = function(baseData, trackList){
var i, len;
var callChange = false;
var removed = []; var removed = [];
var added = []; var added = [];
var newTracks = []; var newTracks = [];
var i, len;
if(!baseData){ if(!baseData){
baseData = webshims.data(this, 'mediaelementBase') || webshims.data(this, 'mediaelementBase', {}); baseData = webshims.data(this, 'mediaelementBase') || webshims.data(this, 'mediaelementBase', {});
} }
@ -1848,12 +1874,13 @@
removed.push(trackList[i]); removed.push(trackList[i]);
} }
} }
if(removed.length || added.length){ if(removed.length || added.length){
trackList.splice(0); trackList.splice(0);
for(i = 0, len = newTracks.length; i < len; i++){ for(i = 0, len = newTracks.length; i < len; i++){
trackList.push(newTracks[i]); trackList.push(newTracks[i]);
} }
for(i = 0, len = removed.length; i < len; i++){ for(i = 0, len = removed.length; i < len; i++){
$([trackList]).triggerHandler($.Event({type: 'removetrack', track: removed[i]})); $([trackList]).triggerHandler($.Event({type: 'removetrack', track: removed[i]}));
@ -1866,6 +1893,16 @@
$(this).triggerHandler('updatetrackdisplay'); $(this).triggerHandler('updatetrackdisplay');
} }
} }
for(i = 0, len = trackList.length; i < len; i++){
if(trackList[i].__wsmode != trackList[i].mode){
trackList[i].__wsmode = trackList[i].mode;
callChange = true;
}
}
if(callChange){
$([trackList]).triggerHandler('change');
}
}; };
var refreshTrack = function(track, trackData){ var refreshTrack = function(track, trackData){

View File

@ -260,10 +260,11 @@ webshims.register('details', function($, webshims, window, doc, undefined, optio
var copyName = {srclang: 'language'}; var copyName = {srclang: 'language'};
var updateMediaTrackList = function(baseData, trackList){ var updateMediaTrackList = function(baseData, trackList){
var i, len;
var callChange = false;
var removed = []; var removed = [];
var added = []; var added = [];
var newTracks = []; var newTracks = [];
var i, len;
if(!baseData){ if(!baseData){
baseData = webshims.data(this, 'mediaelementBase') || webshims.data(this, 'mediaelementBase', {}); baseData = webshims.data(this, 'mediaelementBase') || webshims.data(this, 'mediaelementBase', {});
} }
@ -298,12 +299,13 @@ webshims.register('details', function($, webshims, window, doc, undefined, optio
removed.push(trackList[i]); removed.push(trackList[i]);
} }
} }
if(removed.length || added.length){ if(removed.length || added.length){
trackList.splice(0); trackList.splice(0);
for(i = 0, len = newTracks.length; i < len; i++){ for(i = 0, len = newTracks.length; i < len; i++){
trackList.push(newTracks[i]); trackList.push(newTracks[i]);
} }
for(i = 0, len = removed.length; i < len; i++){ for(i = 0, len = removed.length; i < len; i++){
$([trackList]).triggerHandler($.Event({type: 'removetrack', track: removed[i]})); $([trackList]).triggerHandler($.Event({type: 'removetrack', track: removed[i]}));
@ -316,6 +318,16 @@ webshims.register('details', function($, webshims, window, doc, undefined, optio
$(this).triggerHandler('updatetrackdisplay'); $(this).triggerHandler('updatetrackdisplay');
} }
} }
for(i = 0, len = trackList.length; i < len; i++){
if(trackList[i].__wsmode != trackList[i].mode){
trackList[i].__wsmode = trackList[i].mode;
callChange = true;
}
}
if(callChange){
$([trackList]).triggerHandler('change');
}
}; };
var refreshTrack = function(track, trackData){ var refreshTrack = function(track, trackData){

View File

@ -102,20 +102,25 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
}; };
//jquery mobile and jquery ui //jquery mobile and jquery ui
if(!$.widget){ if(!$.widget && (!$.pluginFactory || !$.pluginFactory.mixin)){
(function(){ (function(){
var _cleanData = $.cleanData; var _cleanData = $.cleanData;
$.cleanData = function( elems ) { $.cleanData = (function( orig ) {
if(!$.widget){ return function( elems ) {
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { var events, elem, i;
for ( i = 0; (elem = elems[i]) != null; i++ ) {
try { try {
$( elem ).triggerHandler( "remove" ); // Only trigger remove when necessary to save time
// http://bugs.jquery.com/ticket/8235 events = $._data( elem, "events" );
} catch( e ) {} if ( events && events.remove ) {
$( elem ).triggerHandler( "remove" );
}
// http://bugs.jquery.com/ticket/8235
} catch ( e ) {}
} }
} orig( elems );
_cleanData( elems ); };
}; })( $.cleanData );
})(); })();
} }
@ -536,7 +541,7 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
return id; return id;
}; };
})(), })(),
domPrefixes: ["ws", "webkit", "moz", "ms", "o"], domPrefixes: ["webkit", "moz", "ms", "o", "ws"],
prefixed: function (prop, obj){ prefixed: function (prop, obj){
var i, testProp; var i, testProp;
@ -1611,22 +1616,19 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
qualitiy = 0.8; qualitiy = 0.8;
} }
loadMoxie(); loadMoxie();
setTimeout(function(){ webshim.ready('moxie', function(){
var img = new mOxie.Image();
dataURL = $canvas.callProp('getAsDataURL', [type, qualitiy]); dataURL = $canvas.callProp('getAsDataURL', [type, qualitiy]);
webshim.ready('moxie', function(){ img.onload = function() {
var img = new mOxie.Image(); var blob = img.getAsBlob();
webshim.defineProperty(blob, '_wsDataURL', {
img.onload = function() { value: dataURL,
var blob = img.getAsBlob(); enumerable: false
webshim.defineProperty(blob, '_wsDataURL', { });
value: dataURL, cb(blob);
enumerable: false };
}); img.load(dataURL);
cb(blob); });
};
img.load(dataURL);
});
}, 9);
} }
} }
}); });
@ -2896,6 +2898,25 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
VIDEO: 1 VIDEO: 1
}; };
var tested = {}; var tested = {};
var addToBlob = function(){
var desc = webshim.defineNodeNameProperty('canvas', 'toBlob', {
prop: {
value: function(){
var context = $(this).callProp('getContext', ['2d']);
var that = this;
var args = arguments;
var cb = function(){
return desc.prop._supvalue.apply(that, args);
};
if(context.wsImageComplete && context._wsIsLoading){
context.wsImageComplete(cb);
} else {
return cb();
}
}
}
});
};
if(!_drawImage){ if(!_drawImage){
webshim.error('canvas.drawImage feature is needed. In IE8 flashvanvas pro can be used'); webshim.error('canvas.drawImage feature is needed. In IE8 flashvanvas pro can be used');
@ -2970,6 +2991,12 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
} }
return _drawImage.apply(this, arguments); return _drawImage.apply(this, arguments);
}; };
if(!document.createElement('canvas').toBlob){
webshims.ready('filereader', addToBlob);
} else {
addToBlob();
}
return true; return true;
}; };

View File

@ -1632,22 +1632,19 @@ webshims.register('form-shim-extend2', function($, webshims, window, document, u
qualitiy = 0.8; qualitiy = 0.8;
} }
loadMoxie(); loadMoxie();
setTimeout(function(){ webshim.ready('moxie', function(){
var img = new mOxie.Image();
dataURL = $canvas.callProp('getAsDataURL', [type, qualitiy]); dataURL = $canvas.callProp('getAsDataURL', [type, qualitiy]);
webshim.ready('moxie', function(){ img.onload = function() {
var img = new mOxie.Image(); var blob = img.getAsBlob();
webshim.defineProperty(blob, '_wsDataURL', {
img.onload = function() { value: dataURL,
var blob = img.getAsBlob(); enumerable: false
webshim.defineProperty(blob, '_wsDataURL', { });
value: dataURL, cb(blob);
enumerable: false };
}); img.load(dataURL);
cb(blob); });
};
img.load(dataURL);
});
}, 9);
} }
} }
}); });

View File

@ -607,22 +607,25 @@ if(webshims.support.inputtypes.date && /webkit/i.test(navigator.userAgent)){
webshims.addReady(function(context, contextElem){ webshims.addReady(function(context, contextElem){
//start constrain-validation //start constrain-validation
var focusElem;
$('form', context) $('form', context)
.add(contextElem.filter('form')) .add(contextElem.filter('form'))
.on('invalid', $.noop) .on('invalid', $.noop)
; ;
try { setTimeout(function(){
if(context == document && !('form' in (document.activeElement || {}))) { var focusElem;
focusElem = $(context.querySelector('input[autofocus], select[autofocus], textarea[autofocus]')).eq(0).getShadowFocusElement()[0]; try {
if (focusElem && focusElem.offsetHeight && focusElem.offsetWidth) { if(!('form' in (document.activeElement || {}))) {
focusElem.focus(); focusElem = $(context.querySelector('input[autofocus], select[autofocus], textarea[autofocus]')).eq(0).getShadowFocusElement()[0];
if (focusElem && (focusElem.offsetHeight || focusElem.offsetWidth)) {
focusElem.focus();
}
} }
} }
} catch (er) {}
catch (er) {} }, 9);
}); });
if(!webshims.support.datalist){ if(!webshims.support.datalist){

View File

@ -102,20 +102,25 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
}; };
//jquery mobile and jquery ui //jquery mobile and jquery ui
if(!$.widget){ if(!$.widget && (!$.pluginFactory || !$.pluginFactory.mixin)){
(function(){ (function(){
var _cleanData = $.cleanData; var _cleanData = $.cleanData;
$.cleanData = function( elems ) { $.cleanData = (function( orig ) {
if(!$.widget){ return function( elems ) {
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { var events, elem, i;
for ( i = 0; (elem = elems[i]) != null; i++ ) {
try { try {
$( elem ).triggerHandler( "remove" ); // Only trigger remove when necessary to save time
// http://bugs.jquery.com/ticket/8235 events = $._data( elem, "events" );
} catch( e ) {} if ( events && events.remove ) {
$( elem ).triggerHandler( "remove" );
}
// http://bugs.jquery.com/ticket/8235
} catch ( e ) {}
} }
} orig( elems );
_cleanData( elems ); };
}; })( $.cleanData );
})(); })();
} }
@ -536,7 +541,7 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
return id; return id;
}; };
})(), })(),
domPrefixes: ["ws", "webkit", "moz", "ms", "o"], domPrefixes: ["webkit", "moz", "ms", "o", "ws"],
prefixed: function (prop, obj){ prefixed: function (prop, obj){
var i, testProp; var i, testProp;
@ -1487,6 +1492,8 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
} }
return message || ''; return message || '';
}; };
webshims.refreshCustomValidityRules = $.noop;
$.fn.getErrorMessage = function(key){ $.fn.getErrorMessage = function(key){
var message = ''; var message = '';

View File

@ -102,20 +102,25 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
}; };
//jquery mobile and jquery ui //jquery mobile and jquery ui
if(!$.widget){ if(!$.widget && (!$.pluginFactory || !$.pluginFactory.mixin)){
(function(){ (function(){
var _cleanData = $.cleanData; var _cleanData = $.cleanData;
$.cleanData = function( elems ) { $.cleanData = (function( orig ) {
if(!$.widget){ return function( elems ) {
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { var events, elem, i;
for ( i = 0; (elem = elems[i]) != null; i++ ) {
try { try {
$( elem ).triggerHandler( "remove" ); // Only trigger remove when necessary to save time
// http://bugs.jquery.com/ticket/8235 events = $._data( elem, "events" );
} catch( e ) {} if ( events && events.remove ) {
$( elem ).triggerHandler( "remove" );
}
// http://bugs.jquery.com/ticket/8235
} catch ( e ) {}
} }
} orig( elems );
_cleanData( elems ); };
}; })( $.cleanData );
})(); })();
} }
@ -536,7 +541,7 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
return id; return id;
}; };
})(), })(),
domPrefixes: ["ws", "webkit", "moz", "ms", "o"], domPrefixes: ["webkit", "moz", "ms", "o", "ws"],
prefixed: function (prop, obj){ prefixed: function (prop, obj){
var i, testProp; var i, testProp;
@ -1487,6 +1492,8 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
} }
return message || ''; return message || '';
}; };
webshims.refreshCustomValidityRules = $.noop;
$.fn.getErrorMessage = function(key){ $.fn.getErrorMessage = function(key){
var message = ''; var message = '';

View File

@ -102,20 +102,25 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
}; };
//jquery mobile and jquery ui //jquery mobile and jquery ui
if(!$.widget){ if(!$.widget && (!$.pluginFactory || !$.pluginFactory.mixin)){
(function(){ (function(){
var _cleanData = $.cleanData; var _cleanData = $.cleanData;
$.cleanData = function( elems ) { $.cleanData = (function( orig ) {
if(!$.widget){ return function( elems ) {
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { var events, elem, i;
for ( i = 0; (elem = elems[i]) != null; i++ ) {
try { try {
$( elem ).triggerHandler( "remove" ); // Only trigger remove when necessary to save time
// http://bugs.jquery.com/ticket/8235 events = $._data( elem, "events" );
} catch( e ) {} if ( events && events.remove ) {
$( elem ).triggerHandler( "remove" );
}
// http://bugs.jquery.com/ticket/8235
} catch ( e ) {}
} }
} orig( elems );
_cleanData( elems ); };
}; })( $.cleanData );
})(); })();
} }
@ -536,7 +541,7 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
return id; return id;
}; };
})(), })(),
domPrefixes: ["ws", "webkit", "moz", "ms", "o"], domPrefixes: ["webkit", "moz", "ms", "o", "ws"],
prefixed: function (prop, obj){ prefixed: function (prop, obj){
var i, testProp; var i, testProp;
@ -1487,6 +1492,8 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
} }
return message || ''; return message || '';
}; };
webshims.refreshCustomValidityRules = $.noop;
$.fn.getErrorMessage = function(key){ $.fn.getErrorMessage = function(key){
var message = ''; var message = '';

View File

@ -102,20 +102,25 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
}; };
//jquery mobile and jquery ui //jquery mobile and jquery ui
if(!$.widget){ if(!$.widget && (!$.pluginFactory || !$.pluginFactory.mixin)){
(function(){ (function(){
var _cleanData = $.cleanData; var _cleanData = $.cleanData;
$.cleanData = function( elems ) { $.cleanData = (function( orig ) {
if(!$.widget){ return function( elems ) {
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { var events, elem, i;
for ( i = 0; (elem = elems[i]) != null; i++ ) {
try { try {
$( elem ).triggerHandler( "remove" ); // Only trigger remove when necessary to save time
// http://bugs.jquery.com/ticket/8235 events = $._data( elem, "events" );
} catch( e ) {} if ( events && events.remove ) {
$( elem ).triggerHandler( "remove" );
}
// http://bugs.jquery.com/ticket/8235
} catch ( e ) {}
} }
} orig( elems );
_cleanData( elems ); };
}; })( $.cleanData );
})(); })();
} }
@ -536,7 +541,7 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
return id; return id;
}; };
})(), })(),
domPrefixes: ["ws", "webkit", "moz", "ms", "o"], domPrefixes: ["webkit", "moz", "ms", "o", "ws"],
prefixed: function (prop, obj){ prefixed: function (prop, obj){
var i, testProp; var i, testProp;
@ -1343,10 +1348,11 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
var copyName = {srclang: 'language'}; var copyName = {srclang: 'language'};
var updateMediaTrackList = function(baseData, trackList){ var updateMediaTrackList = function(baseData, trackList){
var i, len;
var callChange = false;
var removed = []; var removed = [];
var added = []; var added = [];
var newTracks = []; var newTracks = [];
var i, len;
if(!baseData){ if(!baseData){
baseData = webshims.data(this, 'mediaelementBase') || webshims.data(this, 'mediaelementBase', {}); baseData = webshims.data(this, 'mediaelementBase') || webshims.data(this, 'mediaelementBase', {});
} }
@ -1381,12 +1387,13 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
removed.push(trackList[i]); removed.push(trackList[i]);
} }
} }
if(removed.length || added.length){ if(removed.length || added.length){
trackList.splice(0); trackList.splice(0);
for(i = 0, len = newTracks.length; i < len; i++){ for(i = 0, len = newTracks.length; i < len; i++){
trackList.push(newTracks[i]); trackList.push(newTracks[i]);
} }
for(i = 0, len = removed.length; i < len; i++){ for(i = 0, len = removed.length; i < len; i++){
$([trackList]).triggerHandler($.Event({type: 'removetrack', track: removed[i]})); $([trackList]).triggerHandler($.Event({type: 'removetrack', track: removed[i]}));
@ -1399,6 +1406,16 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
$(this).triggerHandler('updatetrackdisplay'); $(this).triggerHandler('updatetrackdisplay');
} }
} }
for(i = 0, len = trackList.length; i < len; i++){
if(trackList[i].__wsmode != trackList[i].mode){
trackList[i].__wsmode = trackList[i].mode;
callChange = true;
}
}
if(callChange){
$([trackList]).triggerHandler('change');
}
}; };
var refreshTrack = function(track, trackData){ var refreshTrack = function(track, trackData){

View File

@ -102,20 +102,25 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
}; };
//jquery mobile and jquery ui //jquery mobile and jquery ui
if(!$.widget){ if(!$.widget && (!$.pluginFactory || !$.pluginFactory.mixin)){
(function(){ (function(){
var _cleanData = $.cleanData; var _cleanData = $.cleanData;
$.cleanData = function( elems ) { $.cleanData = (function( orig ) {
if(!$.widget){ return function( elems ) {
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { var events, elem, i;
for ( i = 0; (elem = elems[i]) != null; i++ ) {
try { try {
$( elem ).triggerHandler( "remove" ); // Only trigger remove when necessary to save time
// http://bugs.jquery.com/ticket/8235 events = $._data( elem, "events" );
} catch( e ) {} if ( events && events.remove ) {
$( elem ).triggerHandler( "remove" );
}
// http://bugs.jquery.com/ticket/8235
} catch ( e ) {}
} }
} orig( elems );
_cleanData( elems ); };
}; })( $.cleanData );
})(); })();
} }
@ -536,7 +541,7 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
return id; return id;
}; };
})(), })(),
domPrefixes: ["ws", "webkit", "moz", "ms", "o"], domPrefixes: ["webkit", "moz", "ms", "o", "ws"],
prefixed: function (prop, obj){ prefixed: function (prop, obj){
var i, testProp; var i, testProp;

View File

@ -1871,9 +1871,13 @@ webshims.register('form-native-extend', function($, webshims, window, doc, undef
}, },
time: function(val, o, noCorrect){ time: function(val, o, noCorrect){
var fVal, i; var fVal, i;
if(val){ if(val){
val = val.split(':'); val = val.split(':');
if(val.length != 2 || isNaN(parseInt(val[0] || '', 10)) || isNaN(parseInt(val[1] || '', 10))){
return val.join(':');
}
if(curCfg.meridian){ if(curCfg.meridian){
fVal = (val[0] * 1); fVal = (val[0] * 1);
if(fVal && fVal >= 12){ if(fVal && fVal >= 12){
@ -2028,6 +2032,7 @@ webshims.register('form-native-extend', function($, webshims, window, doc, undef
createFormat('d'); createFormat('d');
var tmp, obj; var tmp, obj;
var ret = ''; var ret = '';
if(opts.splitInput){ if(opts.splitInput){
obj = {yy: 0, mm: 1, dd: 2}; obj = {yy: 0, mm: 1, dd: 2};
} else { } else {
@ -2049,8 +2054,7 @@ webshims.register('form-native-extend', function($, webshims, window, doc, undef
} }
ret = ([addZero(val[obj.yy]), addZero(val[obj.mm]), addZero(val[obj.dd])]).join('-'); ret = ([addZero(val[obj.yy]), addZero(val[obj.mm]), addZero(val[obj.dd])]).join('-');
} }
return ret return ret;
;
}, },
color: function(val, opts){ color: function(val, opts){
var ret = '#000000'; var ret = '#000000';
@ -2352,9 +2356,11 @@ webshims.register('form-native-extend', function($, webshims, window, doc, undef
}; };
['defaultValue', 'value'].forEach(function(name){ ['defaultValue', 'value'].forEach(function(name){
var formatName = 'format'+name;
wsWidgetProto[name] = function(val, force){ wsWidgetProto[name] = function(val, force){
if(!this._init || force || val !== this.options[name]){ if(!this._init || force || val !== this.options[name] || this.options[formatName] != this.element.prop(name)){
this.element.prop(name, this.formatValue(val)); this.options[formatName] = this.formatValue(val);
this.element.prop(name, this.options[formatName]);
this.options[name] = val; this.options[name] = val;
this._propertyChange(name); this._propertyChange(name);
this.mirrorValidity(); this.mirrorValidity();
@ -2478,36 +2484,34 @@ webshims.register('form-native-extend', function($, webshims, window, doc, undef
var isValue = name == 'value'; var isValue = name == 'value';
spinBtnProto[name] = function(val, force, isLive){ spinBtnProto[name] = function(val, force, isLive){
var selectionEnd; var selectionEnd;
if(!this._init || force || this.options[name] !== val){ if(isValue){
if(isValue){ this._beforeValue(val);
this._beforeValue(val); } else {
} else { this.elemHelper.prop(name, val);
this.elemHelper.prop(name, val);
}
val = formatVal[this.type](val, this.options);
if(this.options.splitInput){
$.each(this.splits, function(i, elem){
var setOption;
if(!(name in elem) && !isValue && $.nodeName(elem, 'select')){
$('option[value="'+ val[i] +'"]', elem).prop('defaultSelected', true);
} else {
$.prop(elem, name, val[i]);
}
});
} else {
val = this.toFixed(val);
if(isLive && this._getSelectionEnd){
selectionEnd = this._getSelectionEnd(val);
}
this.element.prop(name, val);
if(selectionEnd != null){
this.element.prop('selectionEnd', selectionEnd);
}
}
this._propertyChange(name);
this.mirrorValidity();
} }
val = formatVal[this.type](val, this.options);
if(this.options.splitInput){
$.each(this.splits, function(i, elem){
var setOption;
if(!(name in elem) && !isValue && $.nodeName(elem, 'select')){
$('option[value="'+ val[i] +'"]', elem).prop('defaultSelected', true);
} else {
$.prop(elem, name, val[i]);
}
});
} else {
val = this.toFixed(val);
if(isLive && this._getSelectionEnd){
selectionEnd = this._getSelectionEnd(val);
}
this.element.prop(name, val);
if(selectionEnd != null){
this.element.prop('selectionEnd', selectionEnd);
}
}
this._propertyChange(name);
this.mirrorValidity();
}; };
}); });

View File

@ -1871,9 +1871,13 @@ webshims.register('form-native-extend', function($, webshims, window, doc, undef
}, },
time: function(val, o, noCorrect){ time: function(val, o, noCorrect){
var fVal, i; var fVal, i;
if(val){ if(val){
val = val.split(':'); val = val.split(':');
if(val.length != 2 || isNaN(parseInt(val[0] || '', 10)) || isNaN(parseInt(val[1] || '', 10))){
return val.join(':');
}
if(curCfg.meridian){ if(curCfg.meridian){
fVal = (val[0] * 1); fVal = (val[0] * 1);
if(fVal && fVal >= 12){ if(fVal && fVal >= 12){
@ -2028,6 +2032,7 @@ webshims.register('form-native-extend', function($, webshims, window, doc, undef
createFormat('d'); createFormat('d');
var tmp, obj; var tmp, obj;
var ret = ''; var ret = '';
if(opts.splitInput){ if(opts.splitInput){
obj = {yy: 0, mm: 1, dd: 2}; obj = {yy: 0, mm: 1, dd: 2};
} else { } else {
@ -2049,8 +2054,7 @@ webshims.register('form-native-extend', function($, webshims, window, doc, undef
} }
ret = ([addZero(val[obj.yy]), addZero(val[obj.mm]), addZero(val[obj.dd])]).join('-'); ret = ([addZero(val[obj.yy]), addZero(val[obj.mm]), addZero(val[obj.dd])]).join('-');
} }
return ret return ret;
;
}, },
color: function(val, opts){ color: function(val, opts){
var ret = '#000000'; var ret = '#000000';
@ -2352,9 +2356,11 @@ webshims.register('form-native-extend', function($, webshims, window, doc, undef
}; };
['defaultValue', 'value'].forEach(function(name){ ['defaultValue', 'value'].forEach(function(name){
var formatName = 'format'+name;
wsWidgetProto[name] = function(val, force){ wsWidgetProto[name] = function(val, force){
if(!this._init || force || val !== this.options[name]){ if(!this._init || force || val !== this.options[name] || this.options[formatName] != this.element.prop(name)){
this.element.prop(name, this.formatValue(val)); this.options[formatName] = this.formatValue(val);
this.element.prop(name, this.options[formatName]);
this.options[name] = val; this.options[name] = val;
this._propertyChange(name); this._propertyChange(name);
this.mirrorValidity(); this.mirrorValidity();
@ -2478,36 +2484,34 @@ webshims.register('form-native-extend', function($, webshims, window, doc, undef
var isValue = name == 'value'; var isValue = name == 'value';
spinBtnProto[name] = function(val, force, isLive){ spinBtnProto[name] = function(val, force, isLive){
var selectionEnd; var selectionEnd;
if(!this._init || force || this.options[name] !== val){ if(isValue){
if(isValue){ this._beforeValue(val);
this._beforeValue(val); } else {
} else { this.elemHelper.prop(name, val);
this.elemHelper.prop(name, val);
}
val = formatVal[this.type](val, this.options);
if(this.options.splitInput){
$.each(this.splits, function(i, elem){
var setOption;
if(!(name in elem) && !isValue && $.nodeName(elem, 'select')){
$('option[value="'+ val[i] +'"]', elem).prop('defaultSelected', true);
} else {
$.prop(elem, name, val[i]);
}
});
} else {
val = this.toFixed(val);
if(isLive && this._getSelectionEnd){
selectionEnd = this._getSelectionEnd(val);
}
this.element.prop(name, val);
if(selectionEnd != null){
this.element.prop('selectionEnd', selectionEnd);
}
}
this._propertyChange(name);
this.mirrorValidity();
} }
val = formatVal[this.type](val, this.options);
if(this.options.splitInput){
$.each(this.splits, function(i, elem){
var setOption;
if(!(name in elem) && !isValue && $.nodeName(elem, 'select')){
$('option[value="'+ val[i] +'"]', elem).prop('defaultSelected', true);
} else {
$.prop(elem, name, val[i]);
}
});
} else {
val = this.toFixed(val);
if(isLive && this._getSelectionEnd){
selectionEnd = this._getSelectionEnd(val);
}
this.element.prop(name, val);
if(selectionEnd != null){
this.element.prop('selectionEnd', selectionEnd);
}
}
this._propertyChange(name);
this.mirrorValidity();
}; };
}); });

View File

@ -325,20 +325,25 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
}; };
//jquery mobile and jquery ui //jquery mobile and jquery ui
if(!$.widget){ if(!$.widget && (!$.pluginFactory || !$.pluginFactory.mixin)){
(function(){ (function(){
var _cleanData = $.cleanData; var _cleanData = $.cleanData;
$.cleanData = function( elems ) { $.cleanData = (function( orig ) {
if(!$.widget){ return function( elems ) {
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { var events, elem, i;
for ( i = 0; (elem = elems[i]) != null; i++ ) {
try { try {
$( elem ).triggerHandler( "remove" ); // Only trigger remove when necessary to save time
// http://bugs.jquery.com/ticket/8235 events = $._data( elem, "events" );
} catch( e ) {} if ( events && events.remove ) {
$( elem ).triggerHandler( "remove" );
}
// http://bugs.jquery.com/ticket/8235
} catch ( e ) {}
} }
} orig( elems );
_cleanData( elems ); };
}; })( $.cleanData );
})(); })();
} }
@ -759,7 +764,7 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
return id; return id;
}; };
})(), })(),
domPrefixes: ["ws", "webkit", "moz", "ms", "o"], domPrefixes: ["webkit", "moz", "ms", "o", "ws"],
prefixed: function (prop, obj){ prefixed: function (prop, obj){
var i, testProp; var i, testProp;
@ -1710,6 +1715,8 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
} }
return message || ''; return message || '';
}; };
webshims.refreshCustomValidityRules = $.noop;
$.fn.getErrorMessage = function(key){ $.fn.getErrorMessage = function(key){
var message = ''; var message = '';

View File

@ -325,20 +325,25 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
}; };
//jquery mobile and jquery ui //jquery mobile and jquery ui
if(!$.widget){ if(!$.widget && (!$.pluginFactory || !$.pluginFactory.mixin)){
(function(){ (function(){
var _cleanData = $.cleanData; var _cleanData = $.cleanData;
$.cleanData = function( elems ) { $.cleanData = (function( orig ) {
if(!$.widget){ return function( elems ) {
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { var events, elem, i;
for ( i = 0; (elem = elems[i]) != null; i++ ) {
try { try {
$( elem ).triggerHandler( "remove" ); // Only trigger remove when necessary to save time
// http://bugs.jquery.com/ticket/8235 events = $._data( elem, "events" );
} catch( e ) {} if ( events && events.remove ) {
$( elem ).triggerHandler( "remove" );
}
// http://bugs.jquery.com/ticket/8235
} catch ( e ) {}
} }
} orig( elems );
_cleanData( elems ); };
}; })( $.cleanData );
})(); })();
} }
@ -759,7 +764,7 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
return id; return id;
}; };
})(), })(),
domPrefixes: ["ws", "webkit", "moz", "ms", "o"], domPrefixes: ["webkit", "moz", "ms", "o", "ws"],
prefixed: function (prop, obj){ prefixed: function (prop, obj){
var i, testProp; var i, testProp;
@ -1710,6 +1715,8 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
} }
return message || ''; return message || '';
}; };
webshims.refreshCustomValidityRules = $.noop;
$.fn.getErrorMessage = function(key){ $.fn.getErrorMessage = function(key){
var message = ''; var message = '';

View File

@ -102,20 +102,25 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
}; };
//jquery mobile and jquery ui //jquery mobile and jquery ui
if(!$.widget){ if(!$.widget && (!$.pluginFactory || !$.pluginFactory.mixin)){
(function(){ (function(){
var _cleanData = $.cleanData; var _cleanData = $.cleanData;
$.cleanData = function( elems ) { $.cleanData = (function( orig ) {
if(!$.widget){ return function( elems ) {
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { var events, elem, i;
for ( i = 0; (elem = elems[i]) != null; i++ ) {
try { try {
$( elem ).triggerHandler( "remove" ); // Only trigger remove when necessary to save time
// http://bugs.jquery.com/ticket/8235 events = $._data( elem, "events" );
} catch( e ) {} if ( events && events.remove ) {
$( elem ).triggerHandler( "remove" );
}
// http://bugs.jquery.com/ticket/8235
} catch ( e ) {}
} }
} orig( elems );
_cleanData( elems ); };
}; })( $.cleanData );
})(); })();
} }
@ -536,7 +541,7 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
return id; return id;
}; };
})(), })(),
domPrefixes: ["ws", "webkit", "moz", "ms", "o"], domPrefixes: ["webkit", "moz", "ms", "o", "ws"],
prefixed: function (prop, obj){ prefixed: function (prop, obj){
var i, testProp; var i, testProp;
@ -2275,9 +2280,13 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
}, },
time: function(val, o, noCorrect){ time: function(val, o, noCorrect){
var fVal, i; var fVal, i;
if(val){ if(val){
val = val.split(':'); val = val.split(':');
if(val.length != 2 || isNaN(parseInt(val[0] || '', 10)) || isNaN(parseInt(val[1] || '', 10))){
return val.join(':');
}
if(curCfg.meridian){ if(curCfg.meridian){
fVal = (val[0] * 1); fVal = (val[0] * 1);
if(fVal && fVal >= 12){ if(fVal && fVal >= 12){
@ -2432,6 +2441,7 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
createFormat('d'); createFormat('d');
var tmp, obj; var tmp, obj;
var ret = ''; var ret = '';
if(opts.splitInput){ if(opts.splitInput){
obj = {yy: 0, mm: 1, dd: 2}; obj = {yy: 0, mm: 1, dd: 2};
} else { } else {
@ -2453,8 +2463,7 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
} }
ret = ([addZero(val[obj.yy]), addZero(val[obj.mm]), addZero(val[obj.dd])]).join('-'); ret = ([addZero(val[obj.yy]), addZero(val[obj.mm]), addZero(val[obj.dd])]).join('-');
} }
return ret return ret;
;
}, },
color: function(val, opts){ color: function(val, opts){
var ret = '#000000'; var ret = '#000000';
@ -2756,9 +2765,11 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
}; };
['defaultValue', 'value'].forEach(function(name){ ['defaultValue', 'value'].forEach(function(name){
var formatName = 'format'+name;
wsWidgetProto[name] = function(val, force){ wsWidgetProto[name] = function(val, force){
if(!this._init || force || val !== this.options[name]){ if(!this._init || force || val !== this.options[name] || this.options[formatName] != this.element.prop(name)){
this.element.prop(name, this.formatValue(val)); this.options[formatName] = this.formatValue(val);
this.element.prop(name, this.options[formatName]);
this.options[name] = val; this.options[name] = val;
this._propertyChange(name); this._propertyChange(name);
this.mirrorValidity(); this.mirrorValidity();
@ -2882,36 +2893,34 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
var isValue = name == 'value'; var isValue = name == 'value';
spinBtnProto[name] = function(val, force, isLive){ spinBtnProto[name] = function(val, force, isLive){
var selectionEnd; var selectionEnd;
if(!this._init || force || this.options[name] !== val){ if(isValue){
if(isValue){ this._beforeValue(val);
this._beforeValue(val); } else {
} else { this.elemHelper.prop(name, val);
this.elemHelper.prop(name, val);
}
val = formatVal[this.type](val, this.options);
if(this.options.splitInput){
$.each(this.splits, function(i, elem){
var setOption;
if(!(name in elem) && !isValue && $.nodeName(elem, 'select')){
$('option[value="'+ val[i] +'"]', elem).prop('defaultSelected', true);
} else {
$.prop(elem, name, val[i]);
}
});
} else {
val = this.toFixed(val);
if(isLive && this._getSelectionEnd){
selectionEnd = this._getSelectionEnd(val);
}
this.element.prop(name, val);
if(selectionEnd != null){
this.element.prop('selectionEnd', selectionEnd);
}
}
this._propertyChange(name);
this.mirrorValidity();
} }
val = formatVal[this.type](val, this.options);
if(this.options.splitInput){
$.each(this.splits, function(i, elem){
var setOption;
if(!(name in elem) && !isValue && $.nodeName(elem, 'select')){
$('option[value="'+ val[i] +'"]', elem).prop('defaultSelected', true);
} else {
$.prop(elem, name, val[i]);
}
});
} else {
val = this.toFixed(val);
if(isLive && this._getSelectionEnd){
selectionEnd = this._getSelectionEnd(val);
}
this.element.prop(name, val);
if(selectionEnd != null){
this.element.prop('selectionEnd', selectionEnd);
}
}
this._propertyChange(name);
this.mirrorValidity();
}; };
}); });

View File

@ -102,20 +102,25 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
}; };
//jquery mobile and jquery ui //jquery mobile and jquery ui
if(!$.widget){ if(!$.widget && (!$.pluginFactory || !$.pluginFactory.mixin)){
(function(){ (function(){
var _cleanData = $.cleanData; var _cleanData = $.cleanData;
$.cleanData = function( elems ) { $.cleanData = (function( orig ) {
if(!$.widget){ return function( elems ) {
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { var events, elem, i;
for ( i = 0; (elem = elems[i]) != null; i++ ) {
try { try {
$( elem ).triggerHandler( "remove" ); // Only trigger remove when necessary to save time
// http://bugs.jquery.com/ticket/8235 events = $._data( elem, "events" );
} catch( e ) {} if ( events && events.remove ) {
$( elem ).triggerHandler( "remove" );
}
// http://bugs.jquery.com/ticket/8235
} catch ( e ) {}
} }
} orig( elems );
_cleanData( elems ); };
}; })( $.cleanData );
})(); })();
} }
@ -536,7 +541,7 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
return id; return id;
}; };
})(), })(),
domPrefixes: ["ws", "webkit", "moz", "ms", "o"], domPrefixes: ["webkit", "moz", "ms", "o", "ws"],
prefixed: function (prop, obj){ prefixed: function (prop, obj){
var i, testProp; var i, testProp;

File diff suppressed because it is too large Load Diff

View File

@ -380,22 +380,19 @@ webshim.register('filereader-xhr', function($, webshim, window, document, undefi
qualitiy = 0.8; qualitiy = 0.8;
} }
loadMoxie(); loadMoxie();
setTimeout(function(){ webshim.ready('moxie', function(){
var img = new mOxie.Image();
dataURL = $canvas.callProp('getAsDataURL', [type, qualitiy]); dataURL = $canvas.callProp('getAsDataURL', [type, qualitiy]);
webshim.ready('moxie', function(){ img.onload = function() {
var img = new mOxie.Image(); var blob = img.getAsBlob();
webshim.defineProperty(blob, '_wsDataURL', {
img.onload = function() { value: dataURL,
var blob = img.getAsBlob(); enumerable: false
webshim.defineProperty(blob, '_wsDataURL', { });
value: dataURL, cb(blob);
enumerable: false };
}); img.load(dataURL);
cb(blob); });
};
img.load(dataURL);
});
}, 9);
} }
} }
}); });

View File

@ -256,6 +256,8 @@ webshims.register('form-core', function($, webshims, window, document, undefined
} }
return message || ''; return message || '';
}; };
webshims.refreshCustomValidityRules = $.noop;
$.fn.getErrorMessage = function(key){ $.fn.getErrorMessage = function(key){
var message = ''; var message = '';

View File

@ -424,9 +424,13 @@ webshims.register('form-number-date-ui', function($, webshims, window, document,
}, },
time: function(val, o, noCorrect){ time: function(val, o, noCorrect){
var fVal, i; var fVal, i;
if(val){ if(val){
val = val.split(':'); val = val.split(':');
if(val.length != 2 || isNaN(parseInt(val[0] || '', 10)) || isNaN(parseInt(val[1] || '', 10))){
return val.join(':');
}
if(curCfg.meridian){ if(curCfg.meridian){
fVal = (val[0] * 1); fVal = (val[0] * 1);
if(fVal && fVal >= 12){ if(fVal && fVal >= 12){
@ -581,6 +585,7 @@ webshims.register('form-number-date-ui', function($, webshims, window, document,
createFormat('d'); createFormat('d');
var tmp, obj; var tmp, obj;
var ret = ''; var ret = '';
if(opts.splitInput){ if(opts.splitInput){
obj = {yy: 0, mm: 1, dd: 2}; obj = {yy: 0, mm: 1, dd: 2};
} else { } else {
@ -602,8 +607,7 @@ webshims.register('form-number-date-ui', function($, webshims, window, document,
} }
ret = ([addZero(val[obj.yy]), addZero(val[obj.mm]), addZero(val[obj.dd])]).join('-'); ret = ([addZero(val[obj.yy]), addZero(val[obj.mm]), addZero(val[obj.dd])]).join('-');
} }
return ret return ret;
;
}, },
color: function(val, opts){ color: function(val, opts){
var ret = '#000000'; var ret = '#000000';
@ -905,9 +909,11 @@ webshims.register('form-number-date-ui', function($, webshims, window, document,
}; };
['defaultValue', 'value'].forEach(function(name){ ['defaultValue', 'value'].forEach(function(name){
var formatName = 'format'+name;
wsWidgetProto[name] = function(val, force){ wsWidgetProto[name] = function(val, force){
if(!this._init || force || val !== this.options[name]){ if(!this._init || force || val !== this.options[name] || this.options[formatName] != this.element.prop(name)){
this.element.prop(name, this.formatValue(val)); this.options[formatName] = this.formatValue(val);
this.element.prop(name, this.options[formatName]);
this.options[name] = val; this.options[name] = val;
this._propertyChange(name); this._propertyChange(name);
this.mirrorValidity(); this.mirrorValidity();
@ -1031,36 +1037,34 @@ webshims.register('form-number-date-ui', function($, webshims, window, document,
var isValue = name == 'value'; var isValue = name == 'value';
spinBtnProto[name] = function(val, force, isLive){ spinBtnProto[name] = function(val, force, isLive){
var selectionEnd; var selectionEnd;
if(!this._init || force || this.options[name] !== val){ if(isValue){
if(isValue){ this._beforeValue(val);
this._beforeValue(val); } else {
} else { this.elemHelper.prop(name, val);
this.elemHelper.prop(name, val);
}
val = formatVal[this.type](val, this.options);
if(this.options.splitInput){
$.each(this.splits, function(i, elem){
var setOption;
if(!(name in elem) && !isValue && $.nodeName(elem, 'select')){
$('option[value="'+ val[i] +'"]', elem).prop('defaultSelected', true);
} else {
$.prop(elem, name, val[i]);
}
});
} else {
val = this.toFixed(val);
if(isLive && this._getSelectionEnd){
selectionEnd = this._getSelectionEnd(val);
}
this.element.prop(name, val);
if(selectionEnd != null){
this.element.prop('selectionEnd', selectionEnd);
}
}
this._propertyChange(name);
this.mirrorValidity();
} }
val = formatVal[this.type](val, this.options);
if(this.options.splitInput){
$.each(this.splits, function(i, elem){
var setOption;
if(!(name in elem) && !isValue && $.nodeName(elem, 'select')){
$('option[value="'+ val[i] +'"]', elem).prop('defaultSelected', true);
} else {
$.prop(elem, name, val[i]);
}
});
} else {
val = this.toFixed(val);
if(isLive && this._getSelectionEnd){
selectionEnd = this._getSelectionEnd(val);
}
this.element.prop(name, val);
if(selectionEnd != null){
this.element.prop('selectionEnd', selectionEnd);
}
}
this._propertyChange(name);
this.mirrorValidity();
}; };
}); });

View File

@ -607,22 +607,25 @@ if(webshims.support.inputtypes.date && /webkit/i.test(navigator.userAgent)){
webshims.addReady(function(context, contextElem){ webshims.addReady(function(context, contextElem){
//start constrain-validation //start constrain-validation
var focusElem;
$('form', context) $('form', context)
.add(contextElem.filter('form')) .add(contextElem.filter('form'))
.on('invalid', $.noop) .on('invalid', $.noop)
; ;
try { setTimeout(function(){
if(context == document && !('form' in (document.activeElement || {}))) { var focusElem;
focusElem = $(context.querySelector('input[autofocus], select[autofocus], textarea[autofocus]')).eq(0).getShadowFocusElement()[0]; try {
if (focusElem && focusElem.offsetHeight && focusElem.offsetWidth) { if(!('form' in (document.activeElement || {}))) {
focusElem.focus(); focusElem = $(context.querySelector('input[autofocus], select[autofocus], textarea[autofocus]')).eq(0).getShadowFocusElement()[0];
if (focusElem && (focusElem.offsetHeight || focusElem.offsetWidth)) {
focusElem.focus();
}
} }
} }
} catch (er) {}
catch (er) {} }, 9);
}); });
if(!webshims.support.datalist){ if(!webshims.support.datalist){

View File

@ -117,7 +117,7 @@ webshims.register('form-validation', function($, webshims, window, document, und
){ ){
return; return;
} }
if(webshims.refreshCustomValidityRules && webshims.refreshCustomValidityRules(elem) == 'async'){ if(webshims.refreshCustomValidityRules(elem) == 'async'){
$(elem).one('updatevalidation.webshims', switchValidityClass); $(elem).one('updatevalidation.webshims', switchValidityClass);
return; return;
} }
@ -423,7 +423,7 @@ webshims.register('form-validation', function($, webshims, window, document, und
if(!appendElement && !invalidParent.test(parent.nodeName)){ if(!appendElement && !invalidParent.test(parent.nodeName)){
appendElement = parent; appendElement = parent;
} }
if(appendElement && $.css(parent, 'overflow') == 'hidden' && $.css(parent, 'position') != 'static'){ if(appendElement && $.css(parent, 'overflow') != 'visible' && $.css(parent, 'position') != 'static'){
appendElement = false; appendElement = false;
} }
} }

View File

@ -7,10 +7,6 @@ webshims.ready('form-validation', function(){
}); });
(function(){ (function(){
if(webshims.refreshCustomValidityRules){
webshims.error("form-validators already included. please remove custom-validity.js");
}
var customValidityRules = {}; var customValidityRules = {};
var formReady = false; var formReady = false;
var blockCustom; var blockCustom;
@ -341,8 +337,6 @@ webshims.ready('form-validation', function(){
val = $.inArray(val, data.specialVal) !== -1; val = $.inArray(val, data.specialVal) !== -1;
} if(data.toggle){ } if(data.toggle){
val = !val; val = !val;
} else {
val = !!val;
} }
$.prop( elem, data.prop, val); $.prop( elem, data.prop, val);
if(iValClasses && e){ if(iValClasses && e){

View File

@ -1188,12 +1188,12 @@ webshims.register('forms-picker', function($, webshims, window, document, undefi
str.push('<th class="week-header ws-week">'+ dateCfg.weekHeader +'</th>'); str.push('<th class="week-header ws-week">'+ dateCfg.weekHeader +'</th>');
for(k = dateCfg.firstDay; k < dateCfg.dayNamesShort.length; k++){ for(k = dateCfg.firstDay; k < dateCfg.dayNamesMin.length; k++){
str.push('<th class="day-'+ k +'"><abbr title="'+ dateCfg.dayNames[k] +'">'+ dateCfg.dayNamesShort[k] +'</abbr></th>'); str.push('<th class="day-'+ k +'"><abbr title="'+ dateCfg.dayNames[k] +'">'+ dateCfg.dayNamesMin[k] +'</abbr></th>');
} }
k = dateCfg.firstDay; k = dateCfg.firstDay;
while(k--){ while(k--){
str.push('<th class="day-'+ k +'"><abbr title="'+ dateCfg.dayNames[k] +'">'+ dateCfg.dayNamesShort[k] +'</abbr></th>'); str.push('<th class="day-'+ k +'"><abbr title="'+ dateCfg.dayNames[k] +'">'+ dateCfg.dayNamesMin[k] +'</abbr></th>');
} }
str.push('</tr></thead><tbody><tr class="ws-row-0">'); str.push('</tr></thead><tbody><tr class="ws-row-0">');

View File

@ -0,0 +1,65 @@
webshims.validityMessages.es = {
"typeMismatch": {
"email": "Si us plau, introduïu una adreça de correu.",
"url": "Si us plau, introduïu un URL."
},
"badInput": {
"number": "Valor no válid",
"date": "Valor no válid",
"time": "Valor no válid",
"range": "Valor no válid",
"datetime-local": "Valor no válid"
},
"tooLong": "Valor no válid",
"patternMismatch": "Si us plau, ajusteu-vos al format sol·licitat: {%title}.",
"valueMissing": {
"defaultMessage": "Si us plau, ompliu aquest camp.",
"checkbox": "Si us plau, marqueu aquesta casella si voleu continuar.",
"select": "Si us plau, seleccioneu un element de la llista.",
"radio": "Si us plau, seleccioneu una de les opcions."
},
"rangeUnderflow": {
"defaultMessage": "El valor ha de superior o igual a {%min}.",
"date": "El valor ha de superior o igual a {%min}.",
"time": "El valor ha de superior o igual a {%min}.",
"datetime-local": "El valor ha de superior o igual a {%min}."
},
"rangeOverflow": {
"defaultMessage": "El valor ha de inferior o igual a {%max}.",
"date": "El valor ha de inferior o igual a {%max}.",
"time": "El valor ha de inferior o igual a {%max}.",
"datetime-local": "El valor ha de inferior o igual a {%max}."
},
"stepMismatch": "Valor no válid"
};
webshims.formcfg.es = {
numberFormat: {
".": ".",
",": ","
},
numberSigns: '.',
dateSigns: '/',
timeSigns: ":. ",
dFormat: "/",
patterns: {
d: 'dd/mm/yy'
},
date: {
closeText: 'Tanca',
prevText: '&#x3C;Ant',
nextText: 'Seg&#x3E;',
currentText: 'Avui',
monthNames: ['gener','gebrer','març','abril','maig','juny',
'juliol','agost','setembre','octubre','novembre','desembre'],
monthNamesShort: ['gen','febr','març','abr','maig','juny',
'jul','ag','set','oct','nov','des'],
dayNames: ['diumenge','dilluns','dimarts','dimecres','dijous','divendres','dissabte'],
dayNamesShort: ['dg','dl','dt','dc','dj','dv','ds'],
dayNamesMin: ['dg','dl','dt','dc','dj','dv','ds'],
weekHeader: 'St',
firstDay: 1,
isRTL: false,
showMonthAfterYear: false,
yearSuffix: ''
}
};

View File

@ -44,8 +44,15 @@ webshims.formcfg.ru = {
patterns: { patterns: {
d: 'dd.mm.yy' d: 'dd.mm.yy'
}, },
month: {
currentText: 'Текущий месяц'
},
time: {
currentText: 'Сейчас'
},
date: { date: {
closeText: 'Закрыть', closeText: 'Закрыть',
clear: 'Очистить',
prevText: '&#x3C;Пред', prevText: '&#x3C;Пред',
nextText: 'След&#x3E;', nextText: 'След&#x3E;',
currentText: 'Сегодня', currentText: 'Сегодня',
@ -53,7 +60,7 @@ webshims.formcfg.ru = {
'Июль','Август','Сентябрь','Октябрь','Ноябрь','Декабрь'], 'Июль','Август','Сентябрь','Октябрь','Ноябрь','Декабрь'],
monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн', monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн',
'Июл','Авг','Сен','Окт','Ноя','Дек'], 'Июл','Авг','Сен','Окт','Ноя','Дек'],
dayNames: ['воскресенье','понедельник','вторник','среда','четверг','пятница','суббота'], dayNames: ['Воскресенье','Понедельник','Вторник','Среда','Четверг','Пятница','Суббота'],
dayNamesShort: ['вск','пнд','втр','срд','чтв','птн','сбт'], dayNamesShort: ['вск','пнд','втр','срд','чтв','птн','сбт'],
dayNamesMin: ['Вс','Пн','Вт','Ср','Чт','Пт','Сб'], dayNamesMin: ['Вс','Пн','Вт','Ср','Чт','Пт','Сб'],
weekHeader: 'Нед', weekHeader: 'Нед',

View File

@ -103,7 +103,6 @@
0% { 0% {
-webkit-transform: rotate(0deg); -webkit-transform: rotate(0deg);
} }
100% { 100% {
-webkit-transform: rotate(360deg); -webkit-transform: rotate(360deg);
} }
@ -113,7 +112,6 @@
-webkit-transform: rotate(0deg); -webkit-transform: rotate(0deg);
transform: rotate(0deg); transform: rotate(0deg);
} }
100% { 100% {
-webkit-transform: rotate(360deg); -webkit-transform: rotate(360deg);
transform: rotate(360deg); transform: rotate(360deg);
@ -468,7 +466,7 @@
.mediaplayer .mediamenu > div > .media-submenu { .mediaplayer .mediamenu > div > .media-submenu {
margin: 0.3125em 0; margin: 0.3125em 0;
padding: 0.3125em 0; padding: 0.3125em 0;
border-top: 0.0625em solid #eeeeee; border-top: 0.0625em solid #eee;
border-top: 0.0625em solid rgba(255, 255, 255, 0.4); border-top: 0.0625em solid rgba(255, 255, 255, 0.4);
} }
.mediaplayer .mediamenu > div > .media-submenu:first-child { .mediaplayer .mediamenu > div > .media-submenu:first-child {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 552 B

After

Width:  |  Height:  |  Size: 491 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 162 B

After

Width:  |  Height:  |  Size: 96 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 214 B

After

Width:  |  Height:  |  Size: 139 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 B

After

Width:  |  Height:  |  Size: 79 B

View File

@ -81,6 +81,7 @@ webshim.register('mediacapture', function($, webshim, window, document, undefine
resolve(); resolve();
} }
})(); })();
var regImage = /image\/\*|image\/jp/i;
var loadPicker = function(){ var loadPicker = function(){
webshim.ready('WINDOWLOAD', function(){ webshim.ready('WINDOWLOAD', function(){
webshim.loader.loadList(['mediacapture-picker']); webshim.loader.loadList(['mediacapture-picker']);
@ -91,10 +92,15 @@ webshim.register('mediacapture', function($, webshim, window, document, undefine
var _createPhotoPicker = function(){ var _createPhotoPicker = function(){
if($(this).is('[capture].ws-filereader, .ws-capture') && webshim.implement(this, 'capture')){ if($(this).is('[capture].ws-filereader, .ws-capture') && webshim.implement(this, 'capture')){
var $wrapper, $customFile; var $wrapper, $customFile, $button, popover;
var $fileinput = $(this); var $fileinput = $(this);
var $button = $('<button type="button" class="ws-capture-button">photo</button>'); var accept = $fileinput.prop('accept') || 'image/*';
var popover = webshim.objectCreate(webshim.wsPopover, {}, $.extend({prepareFor: $button}));
if(!regImage.test(accept)){return;}
$button = $('<button type="button" class="ws-capture-button" />');
popover = webshim.objectCreate(webshim.wsPopover, {}, $.extend({prepareFor: $button}));
popover.element.addClass('capture-popover input-picker'); popover.element.addClass('capture-popover input-picker');
if($fileinput.is('.ws-custom-file > *')){ if($fileinput.is('.ws-custom-file > *')){

View File

@ -1137,6 +1137,25 @@ webshims.register('mediaelement-jaris', function($, webshims, window, document,
VIDEO: 1 VIDEO: 1
}; };
var tested = {}; var tested = {};
var addToBlob = function(){
var desc = webshim.defineNodeNameProperty('canvas', 'toBlob', {
prop: {
value: function(){
var context = $(this).callProp('getContext', ['2d']);
var that = this;
var args = arguments;
var cb = function(){
return desc.prop._supvalue.apply(that, args);
};
if(context.wsImageComplete && context._wsIsLoading){
context.wsImageComplete(cb);
} else {
return cb();
}
}
}
});
};
if(!_drawImage){ if(!_drawImage){
webshim.error('canvas.drawImage feature is needed. In IE8 flashvanvas pro can be used'); webshim.error('canvas.drawImage feature is needed. In IE8 flashvanvas pro can be used');
@ -1211,6 +1230,12 @@ webshims.register('mediaelement-jaris', function($, webshims, window, document,
} }
return _drawImage.apply(this, arguments); return _drawImage.apply(this, arguments);
}; };
if(!document.createElement('canvas').toBlob){
webshims.ready('filereader', addToBlob);
} else {
addToBlob();
}
return true; return true;
}; };

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 475 B

After

Width:  |  Height:  |  Size: 338 B

View File

@ -140,11 +140,11 @@ SASS:
} }
@font-face { @font-face {
font-family: 'widget'; font-family: 'widget';
src: url(data:application/font-woff;charset=utf-8;base64,d09GRk9UVE8AAAbMAAoAAAAABoQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABDRkYgAAAA9AAAA08AAANPG9W6FE9TLzIAAAREAAAAYAAAAGAIIwcpY21hcAAABKQAAABUAAAAVPCu8JlnYXNwAAAE+AAAAAgAAAAIAAAAEGhlYWQAAAUAAAAANgAAADYABTw7aGhlYQAABTgAAAAkAAAAJAO9AedobXR4AAAFXAAAABgAAAAYBNwAAG1heHAAAAV0AAAABgAAAAYABlAAbmFtZQAABXwAAAEwAAABMOvWjh9wb3N0AAAGrAAAACAAAAAgAAMAAAEABAQAAQEBB3dpZGdldAABAgABADr4HAL4GwP4GAQeCgAZU/+Lix4KABlT/4uLDAeLZviU+HQFHQAAAHkPHQAAAH4RHQAAAAkdAAADRhIABwEBBw0PERQZHndpZGdldHdpZGdldHUwdTF1MjB1RjAxN3VGMDczAAACAYkABAAGAgABAAQABwAKAA0BAQK4/JQO/JQO/JQO+5QO95T31hWL+xQFi4mKiImKiom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AAAAAAIPAX8HP//f//AAH/4w/tD5IAAwABAAAAAAAAAAAAAAAAAAEAAf//AA8AAQAAAAEAAG0trL5fDzz1AAsCAAAAAADPhX3EAAAAAM+FfcQAAP/bAdsB2wAAAAgAAgAAAAAAAAABAAAB4P/gAAACAAAAAAAB2wABAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAEAAAACAAAAAdwAAAAAUAAABgAAAAAADgCuAAEAAAAAAAEADAAAAAEAAAAAAAIADgBAAAEAAAAAAAMADAAiAAEAAAAAAAQADABOAAEAAAAAAAUAFgAMAAEAAAAAAAYABgAuAAEAAAAAAAoAKABaAAMAAQQJAAEADAAAAAMAAQQJAAIADgBAAAMAAQQJAAMADAAiAAMAAQQJAAQADABOAAMAAQQJAAUAFgAMAAMAAQQJAAYADAA0AAMAAQQJAAoAKABaAHcAaQBkAGcAZQB0AFYAZQByAHMAaQBvAG4AIAAxAC4AMAB3AGkAZABnAGUAdHdpZGdldAB3AGkAZABnAGUAdABSAGUAZwB1AGwAYQByAHcAaQBkAGcAZQB0AEcAZQBuAGUAcgBhAHQAZQBkACAAYgB5ACAASQBjAG8ATQBvAG8AbgADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA) format("woff"), url("widget.ttf") format("truetype"); src: url(data:application/font-woff;charset=utf-8;base64,d09GRk9UVE8AAAjsAAoAAAAACKQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABDRkYgAAAA9AAABUkAAAVJvIhCfk9TLzIAAAZAAAAAYAAAAGAIIwcpY21hcAAABqAAAABcAAAAXAofvUVnYXNwAAAG/AAAAAgAAAAIAAAAEGhlYWQAAAcEAAAANgAAADYBqMVraGhlYQAABzwAAAAkAAAAJAQHAhBobXR4AAAHYAAAACgAAAAoDQEAAW1heHAAAAeIAAAABgAAAAYAClAAbmFtZQAAB5AAAAE8AAABPOzIj0pwb3N0AAAIzAAAACAAAAAgAAMAAAEABAQAAQEBB3dpZGdldAABAgABADr4HAL4GwP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ACgAAAAAAAAAAAAAAAAEAAAACJQAAAgAAAAIAAAECAAAAAgAAAAHcAAAAAFAAAAoAAAAAAA4ArgABAAAAAAABAAwAAAABAAAAAAACAA4AQAABAAAAAAADAAwAIgABAAAAAAAEAAwATgABAAAAAAAFABYADAABAAAAAAAGAAYALgABAAAAAAAKADQAWgADAAEECQABAAwAAAADAAEECQACAA4AQAADAAEECQADAAwAIgADAAEECQAEAAwATgADAAEECQAFABYADAADAAEECQAGAAwANAADAAEECQAKADQAWgB3AGkAZABnAGUAdABWAGUAcgBzAGkAbwBuACAAMQAuADAAdwBpAGQAZwBlAHR3aWRnZXQAdwBpAGQAZwBlAHQAUgBlAGcAdQBsAGEAcgB3AGkAZABnAGUAdABGAG8AbgB0ACAAZwBlAG4AZQByAGEAdABlAGQAIABiAHkAIABJAGMAbwBNAG8AbwBuAC4AAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==) format("woff"), url("widget.ttf") format("truetype");
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
} }
.ws-popover-opener > span, .time-input-buttons .ws-popover-opener > span { .ws-popover-opener > span, .time-input-buttons .ws-popover-opener > span, .ws-capture-button {
font-family: 'widget'; font-family: 'widget';
speak: none; speak: none;
font-style: normal; font-style: normal;
@ -166,6 +166,10 @@ SASS:
content: "\f017"; content: "\f017";
} }
.ws-capture-button:before {
content: "\e600";
}
.ws-range, .ws-range,
.ws-range-rail, .ws-range-rail,
.ws-range span > span, .ws-range span > span,
@ -255,6 +259,10 @@ span.has-input-buttons {
margin: -8px 0 0 -8px; margin: -8px 0 0 -8px;
} }
.ws-capture-button:before {
font-family: 'widget';
}
.color-input-buttons .ws-popover-opener > span { .color-input-buttons .ws-popover-opener > span {
background: url(color-picker.png) no-repeat 0 0; background: url(color-picker.png) no-repeat 0 0;
} }
@ -472,7 +480,7 @@ span.ws-input {
height: 1.38462em; height: 1.38462em;
width: 2.30769em; width: 2.30769em;
background: #ccc; background: #ccc;
border: 0.07692em solid #aaaaaa; border: 0.07692em solid #aaa;
cursor: pointer; cursor: pointer;
transition: background-color 400ms, border-color 400ms; transition: background-color 400ms, border-color 400ms;
} }
@ -496,7 +504,7 @@ span.ws-input {
padding: 0.07692em 0.26923em; padding: 0.07692em 0.26923em;
text-align: center; text-align: center;
background: #fff; background: #fff;
border: 0.07692em solid #cccccc; border: 0.07692em solid #ccc;
visibility: visible; visibility: visible;
} }
.ws-range.ws-focus .ws-range-thumb { .ws-range.ws-focus .ws-range-thumb {

View File

@ -137,7 +137,7 @@ SASS:
} }
.input-picker .ws-picker-controls > button { .input-picker .ws-picker-controls > button {
box-sizing: content-box; box-sizing: content-box;
border: 0.07692em solid #cccccc; border: 0.07692em solid #ccc;
padding: 0; padding: 0;
width: 1.84615em; width: 1.84615em;
height: 1.84615em; height: 1.84615em;
@ -228,15 +228,15 @@ SASS:
.input-picker .ws-button-row { .input-picker .ws-button-row {
position: relative; position: relative;
margin: 0.76923em 0 0; margin: 0.76923em 0 0;
border-top: 0.07692em solid #eeeeee; border-top: 0.07692em solid #eee;
padding: 0.76923em 0 0; padding: 0.76923em 0 0;
text-align: left; text-align: left;
z-index: 2; z-index: 2;
} }
.input-picker .ws-button-row > button { .input-picker .ws-button-row > button {
border: 0.07692em solid #cccccc; border: 0.07692em solid #ccc;
background-color: #ddd; background-color: #ddd;
background-image: linear-gradient(to bottom, #ececec 0%, #dddddd 100%); background-image: linear-gradient(to bottom, #ececec 0%, #ddd 100%);
transition: border-color 200ms linear; transition: border-color 200ms linear;
float: left; float: left;
} }
@ -383,7 +383,7 @@ SASS:
} }
.input-picker .ws-options { .input-picker .ws-options {
margin: 0.76923em 0 0; margin: 0.76923em 0 0;
border-top: 0.07692em solid #eeeeee; border-top: 0.07692em solid #eee;
padding: 0.76923em 0 0; padding: 0.76923em 0 0;
text-align: left; text-align: left;
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 542 B

After

Width:  |  Height:  |  Size: 299 B

View File

@ -7,7 +7,7 @@
} }
@font-face { @font-face {
font-family: 'widget'; font-family: 'widget';
src: url(data:application/font-woff;charset=utf-8;base64,d09GRk9UVE8AAAbMAAoAAAAABoQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABDRkYgAAAA9AAAA08AAANPG9W6FE9TLzIAAAREAAAAYAAAAGAIIwcpY21hcAAABKQAAABUAAAAVPCu8JlnYXNwAAAE+AAAAAgAAAAIAAAAEGhlYWQAAAUAAAAANgAAADYABTw7aGhlYQAABTgAAAAkAAAAJAO9AedobXR4AAAFXAAAABgAAAAYBNwAAG1heHAAAAV0AAAABgAAAAYABlAAbmFtZQAABXwAAAEwAAABMOvWjh9wb3N0AAAGrAAAACAAAAAgAAMAAAEABAQAAQEBB3dpZGdldAABAgABADr4HAL4GwP4GAQeCgAZU/+Lix4KABlT/4uLDAeLZviU+HQFHQAAAHkPHQAAAH4RHQAAAAkdAAADRhIABwEBBw0PERQZHndpZGdldHdpZGdldHUwdTF1MjB1RjAxN3VGMDczAAACAYkABAAGAgABAAQABwAKAA0BAQK4/JQO/JQO/JQO+5QO95T31hWL+xQFi4mKiImKiomJioiLCC+LBYmLiYyJjYmMio6LjQiLngWLjYyNjY2NjY2MjYsIy4uL7wWLjoyNjY2NjY2LjosInYsFjouNi4yJjYmMiYuICPcLJxWLp4SlfaN9o3idc5l0mXGSbotvi3GEc310fXh5fXN9c4Rxi2+Lb5JxmXOZc554on0Io32lhKeLqIulkqKZo5menpmjmaOSpYunCMuLFYtjgWZ3anhpcHBqeGl3ZoFji2SLZpVpn2qecKZ3rXisgbCLs4uzla+erZ+spqasnwitnrCVsouzi7CBrXisd6ZwnmqfaZVni2MIDmewixXdi4vdOYuLOQXvixXni4vdL4uLOQUn8BXdi4vmOYuLMAXvixXni4vmL4uLMAUn9wEV3YuL3jmLizgF92b7ZhXmi4vdMIuLOQX7AvdmFeeLi94vi4s4Bfdw+2YV3YuL3TmLizkF+wLwFeaLi+Ywi4swBSb3ihWL3gWLjYqNio2JjYmMiIsIe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ByAHMAaQBvAG4AIAAxAC4AMAB3AGkAZABnAGUAdHdpZGdldAB3AGkAZABnAGUAdABSAGUAZwB1AGwAYQByAHcAaQBkAGcAZQB0AEcAZQBuAGUAcgBhAHQAZQBkACAAYgB5ACAASQBjAG8ATQBvAG8AbgADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA) format('woff'), src: url(data:application/font-woff;charset=utf-8;base64,d09GRk9UVE8AAAjsAAoAAAAACKQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABDRkYgAAAA9AAABUkAAAVJvIhCfk9TLzIAAAZAAAAAYAAAAGAIIwcpY21hcAAABqAAAABcAAAAXAofvUVnYXNwAAAG/AAAAAgAAAAIAAAAEGhlYWQAAAcEAAAANgAAADYBqMVraGhlYQAABzwAAAAkAAAAJAQHAhBobXR4AAAHYAAAACgAAAAoDQEAAW1heHAAAAeIAAAABgAAAAYAClAAbmFtZQAAB5AAAAE8AAABPOzIj0pwb3N0AAAIzAAAACAAAAAgAAMAAAEABAQAAQEBB3dpZGdldAABAgABADr4HAL4GwP4GAQeCgAZU/+Lix4KABlT/4uLDAeLZvi5+HQFHQAAAJEPHQAAAJYRHQAAAAkdAAAFQBIACwEBBw0PERQZHiMoLTJ3aWRnZXR3aWRnZXR1MHUxdTIwdUU2MDB1RTYwMXVFNjAydUU2MDN1RjAxN3VGMDczAAACAYkACAAKAgABAAQABwAKAA0A5AEIAdYB7wLhBJL8lA78lA78lA77lA6wi9QVi/eUBYufkp2ZmZqZnJKfiwjLi5qyBY6UkpSVkZSSlY6Viwj3JosFlouUiJWElYWRgo+CCJlky4sFoIuchJl9mX2TeYt3CIv7lAWLd4N6fXx9fXqEdosI/CaLBXeLepJ8mX2ahJyLnwj3JvcUFYtomG2kcqRyqX6ui6+LqZikpKSkl6mLrouuf6pypHKkbZdni2iLbX9ycnJyfmyLaAi5ixWLopOem5ubm5+ToYuii56Dm3uce5N4i3SLdIN4ent7e3iDdIt1i3eTe5t7m4Oei6I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AAAAAAAAAAAA==) format('woff'),
url('widget.ttf') format('truetype'); url('widget.ttf') format('truetype');
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
@ -43,6 +43,34 @@
} }
} }
%icon-folder-open {
@extend %iconbase;
&:before {
content: "\e601";
}
}
%icon-close {
@extend %iconbase;
&:before {
content: "\e602";
}
}
%icon-checkmark {
@extend %iconbase;
&:before {
content: "\e603";
}
}
%icon-camera {
@extend %iconbase;
&:before {
content: "\e600";
}
}
.ws-range, .ws-range,
.ws-range-rail, .ws-range-rail,
.ws-range span > span, .ws-range span > span,
@ -142,6 +170,14 @@ span.has-input-buttons {
} }
} }
.ws-capture-button {
@extend %icon-camera;
&:before {
font-family: 'widget';
}
}
.color-input-buttons .ws-popover-opener > span { .color-input-buttons .ws-popover-opener > span {
background: url(color-picker.png) no-repeat 0 0; background: url(color-picker.png) no-repeat 0 0;

View File

@ -587,8 +587,7 @@ summary {
border-style: solid; border-style: solid;
border-width: em(10) em(5) 0 em(5); border-width: em(10) em(5) 0 em(5);
border-color: #000 transparent transparent transparent; border-color: #000 transparent transparent transparent;
vertical-align: middle; vertical-align: middle;
.closed-details-summary & { .closed-details-summary & {
@ -622,7 +621,7 @@ summary.summary-has-focus {
position: relative; position: relative;
z-index: 0; z-index: 0;
display: inline-block; display: inline-block;
padding: 5px; padding: em(5);
border: 1px solid #ccc; border: 1px solid #ccc;
background: #eee; background: #eee;
color: #333; color: #333;
@ -635,6 +634,11 @@ summary.summary-has-focus {
} }
} }
.ws-capture-file > button {
padding-bottom: em(4);
padding-top: em(4);
}
.ws-custom-file { .ws-custom-file {
.ws-file-value { .ws-file-value {
display: block; display: block;
@ -729,9 +733,7 @@ summary.summary-has-focus {
bottom: auto; bottom: auto;
position: static; position: static;
position: -webkit-sticky; position: -webkit-sticky;
position: -moz-sticky;
position: -ms-sticky; position: -ms-sticky;
position: -o-sticky;
position: sticky; position: sticky;
float: none !important; float: none !important;
margin-left: 0; margin-left: 0;

View File

@ -288,7 +288,7 @@ output {
} }
.ws-po-box { .ws-po-box {
border: 0.07692em solid #cccccc; border: 0.07692em solid #ccc;
background: #fff; background: #fff;
color: #000; color: #000;
padding: 0.38462em 0.38462em 0.23077em; padding: 0.38462em 0.38462em 0.23077em;
@ -303,7 +303,7 @@ output {
height: 0; height: 0;
border-left: 0.61538em solid transparent; border-left: 0.61538em solid transparent;
border-right: 0.61538em solid transparent; border-right: 0.61538em solid transparent;
border-bottom: 0.61538em solid #cccccc; border-bottom: 0.61538em solid #ccc;
border-top: none; border-top: none;
zoom: 1; zoom: 1;
} }
@ -323,7 +323,7 @@ output {
top: auto; top: auto;
bottom: 0.30769em; bottom: 0.30769em;
border-bottom: none; border-bottom: none;
border-top: 0.61538em solid #cccccc; border-top: 0.61538em solid #ccc;
} }
html .ws-po-arrow { html .ws-po-arrow {
border-left-color: transparent; border-left-color: transparent;
@ -609,7 +609,7 @@ summary.summary-has-focus {
position: relative; position: relative;
z-index: 0; z-index: 0;
display: inline-block; display: inline-block;
padding: 5px; padding: 0.38462em;
border: 1px solid #ccc; border: 1px solid #ccc;
background: #eee; background: #eee;
color: #333; color: #333;
@ -621,6 +621,11 @@ summary.summary-has-focus {
float: left; float: left;
} }
.ws-capture-file > button {
padding-bottom: 0.30769em;
padding-top: 0.30769em;
}
.ws-custom-file .ws-file-value { .ws-custom-file .ws-file-value {
display: block; display: block;
overflow: hidden; overflow: hidden;
@ -670,7 +675,7 @@ summary.summary-has-focus {
.ws-custom-file > input[type="file"]:focus ~ button { .ws-custom-file > input[type="file"]:focus ~ button {
background: #fff; background: #fff;
border-color: #999; border-color: #999;
background: #eeeeee linear-gradient(transparent, rgba(0, 0, 0, 0.05) 40%, rgba(0, 0, 0, 0.1)); background: #eee linear-gradient(transparent, rgba(0, 0, 0, 0.05) 40%, rgba(0, 0, 0, 0.1));
} }
.ws-custom-file:hover > .ws-file-value, .ws-custom-file.ws-mouseenter > .ws-file-value, .ws-custom-file:hover > .ws-file-value, .ws-custom-file.ws-mouseenter > .ws-file-value,
.ws-custom-file > input[type="file"]:focus ~ .ws-file-value { .ws-custom-file > input[type="file"]:focus ~ .ws-file-value {
@ -698,9 +703,7 @@ summary.summary-has-focus {
bottom: auto; bottom: auto;
position: static; position: static;
position: -webkit-sticky; position: -webkit-sticky;
position: -moz-sticky;
position: -ms-sticky; position: -ms-sticky;
position: -o-sticky;
position: sticky; position: sticky;
float: none !important; float: none !important;
margin-left: 0; margin-left: 0;
@ -870,11 +873,11 @@ SASS:
} }
@font-face { @font-face {
font-family: 'widget'; font-family: 'widget';
src: url(data:application/font-woff;charset=utf-8;base64,d09GRk9UVE8AAAbMAAoAAAAABoQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABDRkYgAAAA9AAAA08AAANPG9W6FE9TLzIAAAREAAAAYAAAAGAIIwcpY21hcAAABKQAAABUAAAAVPCu8JlnYXNwAAAE+AAAAAgAAAAIAAAAEGhlYWQAAAUAAAAANgAAADYABTw7aGhlYQAABTgAAAAkAAAAJAO9AedobXR4AAAFXAAAABgAAAAYBNwAAG1heHAAAAV0AAAABgAAAAYABlAAbmFtZQAABXwAAAEwAAABMOvWjh9wb3N0AAAGrAAAACAAAAAgAAMAAAEABAQAAQEBB3dpZGdldAABAgABADr4HAL4GwP4GAQeCgAZU/+Lix4KABlT/4uLDAeLZviU+HQFHQAAAHkPHQAAAH4RHQAAAAkdAAADRhIABwEBBw0PERQZHndpZGdldHdpZGdldHUwdTF1MjB1RjAxN3VGMDczAAACAYkABAAGAgABAAQABwAKAA0BAQK4/JQO/JQO/JQO+5QO95T31hWL+xQFi4mKiImKiomJioiLCC+LBYmLiYyJjYmMio6LjQiLngWLjYyNjY2NjY2MjYsIy4uL7wWLjoyNjY2NjY2LjosInYsFjouNi4yJjYmMiYuICPcLJxWLp4SlfaN9o3idc5l0mXGSbotvi3GEc310fXh5fXN9c4Rxi2+Lb5JxmXOZc554on0Io32lhKeLqIulkqKZo5menpmjmaOSpYunCMuLFYtjgWZ3anhpcHBqeGl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AAAAUAAABgAAAAAADgCuAAEAAAAAAAEADAAAAAEAAAAAAAIADgBAAAEAAAAAAAMADAAiAAEAAAAAAAQADABOAAEAAAAAAAUAFgAMAAEAAAAAAAYABgAuAAEAAAAAAAoAKABaAAMAAQQJAAEADAAAAAMAAQQJAAIADgBAAAMAAQQJAAMADAAiAAMAAQQJAAQADABOAAMAAQQJAAUAFgAMAAMAAQQJAAYADAA0AAMAAQQJAAoAKABaAHcAaQBkAGcAZQB0AFYAZQByAHMAaQBvAG4AIAAxAC4AMAB3AGkAZABnAGUAdHdpZGdldAB3AGkAZABnAGUAdABSAGUAZwB1AGwAYQByAHcAaQBkAGcAZQB0AEcAZQBuAGUAcgBhAHQAZQBkACAAYgB5ACAASQBjAG8ATQBvAG8AbgADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA) format("woff"), url("widget.ttf") format("truetype"); src: url(data:application/font-woff;charset=utf-8;base64,d09GRk9UVE8AAAjsAAoAAAAACKQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABDRkYgAAAA9AAABUkAAAVJvIhCfk9TLzIAAAZAAAAAYAAAAGAIIwcpY21hcAAABqAAAABcAAAAXAofvUVnYXNwAAAG/AAAAAgAAAAIAAAAEGhlYWQAAAcEAAAANgAAADYBqMVraGhlYQAABzwAAAAkAAAAJAQHAhBobXR4AAAHYAAAACgAAAAoDQEAAW1heHAAAAeIAAAABgAAAAYAClAAbmFtZQAAB5AAAAE8AAABPOzIj0pwb3N0AAAIzAAAACAAAAAgAAMAAAEABAQAAQEBB3dpZGdldAABAgABADr4HAL4GwP4GAQeCgAZU/+Lix4KABlT/4uLDAeLZvi5+HQFHQAAAJEPHQAAAJYRHQAAAAkdAAAFQBIACwEBBw0PERQZHiMoLTJ3aWRnZXR3aWRnZXR1MHUxdTIwdUU2MDB1RTYwMXVFNjAydUU2MDN1RjAxN3VGMDczAAACAYkACAAKAgABAAQABwAKAA0A5AEIAdYB7wLhBJL8lA78lA78lA77lA6wi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AwAIgADAAEECQAEAAwATgADAAEECQAFABYADAADAAEECQAGAAwANAADAAEECQAKADQAWgB3AGkAZABnAGUAdABWAGUAcgBzAGkAbwBuACAAMQAuADAAdwBpAGQAZwBlAHR3aWRnZXQAdwBpAGQAZwBlAHQAUgBlAGcAdQBsAGEAcgB3AGkAZABnAGUAdABGAG8AbgB0ACAAZwBlAG4AZQByAGEAdABlAGQAIABiAHkAIABJAGMAbwBNAG8AbwBuAC4AAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==) format("woff"), url("widget.ttf") format("truetype");
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
} }
.ws-popover-opener > span, .time-input-buttons .ws-popover-opener > span { .ws-popover-opener > span, .time-input-buttons .ws-popover-opener > span, .ws-capture-button {
font-family: 'widget'; font-family: 'widget';
speak: none; speak: none;
font-style: normal; font-style: normal;
@ -896,6 +899,10 @@ SASS:
content: "\f017"; content: "\f017";
} }
.ws-capture-button:before {
content: "\e600";
}
.ws-range, .ws-range,
.ws-range-rail, .ws-range-rail,
.ws-range span > span, .ws-range span > span,
@ -985,6 +992,10 @@ span.has-input-buttons {
margin: -8px 0 0 -8px; margin: -8px 0 0 -8px;
} }
.ws-capture-button:before {
font-family: 'widget';
}
.color-input-buttons .ws-popover-opener > span { .color-input-buttons .ws-popover-opener > span {
background: url(color-picker.png) no-repeat 0 0; background: url(color-picker.png) no-repeat 0 0;
} }
@ -1202,7 +1213,7 @@ span.ws-input {
height: 1.38462em; height: 1.38462em;
width: 2.30769em; width: 2.30769em;
background: #ccc; background: #ccc;
border: 0.07692em solid #aaaaaa; border: 0.07692em solid #aaa;
cursor: pointer; cursor: pointer;
transition: background-color 400ms, border-color 400ms; transition: background-color 400ms, border-color 400ms;
} }
@ -1226,7 +1237,7 @@ span.ws-input {
padding: 0.07692em 0.26923em; padding: 0.07692em 0.26923em;
text-align: center; text-align: center;
background: #fff; background: #fff;
border: 0.07692em solid #cccccc; border: 0.07692em solid #ccc;
visibility: visible; visibility: visible;
} }
.ws-range.ws-focus .ws-range-thumb { .ws-range.ws-focus .ws-range-thumb {

View File

@ -288,7 +288,7 @@ output {
} }
.ws-po-box { .ws-po-box {
border: 0.07692em solid #cccccc; border: 0.07692em solid #ccc;
background: #fff; background: #fff;
color: #000; color: #000;
padding: 0.38462em 0.38462em 0.23077em; padding: 0.38462em 0.38462em 0.23077em;
@ -303,7 +303,7 @@ output {
height: 0; height: 0;
border-left: 0.61538em solid transparent; border-left: 0.61538em solid transparent;
border-right: 0.61538em solid transparent; border-right: 0.61538em solid transparent;
border-bottom: 0.61538em solid #cccccc; border-bottom: 0.61538em solid #ccc;
border-top: none; border-top: none;
zoom: 1; zoom: 1;
} }
@ -323,7 +323,7 @@ output {
top: auto; top: auto;
bottom: 0.30769em; bottom: 0.30769em;
border-bottom: none; border-bottom: none;
border-top: 0.61538em solid #cccccc; border-top: 0.61538em solid #ccc;
} }
html .ws-po-arrow { html .ws-po-arrow {
border-left-color: transparent; border-left-color: transparent;
@ -609,7 +609,7 @@ summary.summary-has-focus {
position: relative; position: relative;
z-index: 0; z-index: 0;
display: inline-block; display: inline-block;
padding: 5px; padding: 0.38462em;
border: 1px solid #ccc; border: 1px solid #ccc;
background: #eee; background: #eee;
color: #333; color: #333;
@ -621,6 +621,11 @@ summary.summary-has-focus {
float: left; float: left;
} }
.ws-capture-file > button {
padding-bottom: 0.30769em;
padding-top: 0.30769em;
}
.ws-custom-file .ws-file-value { .ws-custom-file .ws-file-value {
display: block; display: block;
overflow: hidden; overflow: hidden;
@ -670,7 +675,7 @@ summary.summary-has-focus {
.ws-custom-file > input[type="file"]:focus ~ button { .ws-custom-file > input[type="file"]:focus ~ button {
background: #fff; background: #fff;
border-color: #999; border-color: #999;
background: #eeeeee linear-gradient(transparent, rgba(0, 0, 0, 0.05) 40%, rgba(0, 0, 0, 0.1)); background: #eee linear-gradient(transparent, rgba(0, 0, 0, 0.05) 40%, rgba(0, 0, 0, 0.1));
} }
.ws-custom-file:hover > .ws-file-value, .ws-custom-file.ws-mouseenter > .ws-file-value, .ws-custom-file:hover > .ws-file-value, .ws-custom-file.ws-mouseenter > .ws-file-value,
.ws-custom-file > input[type="file"]:focus ~ .ws-file-value { .ws-custom-file > input[type="file"]:focus ~ .ws-file-value {
@ -698,9 +703,7 @@ summary.summary-has-focus {
bottom: auto; bottom: auto;
position: static; position: static;
position: -webkit-sticky; position: -webkit-sticky;
position: -moz-sticky;
position: -ms-sticky; position: -ms-sticky;
position: -o-sticky;
position: sticky; position: sticky;
float: none !important; float: none !important;
margin-left: 0; margin-left: 0;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 B

After

Width:  |  Height:  |  Size: 93 B

Binary file not shown.

View File

@ -7,6 +7,10 @@
<font-face units-per-em="512" ascent="480" descent="-32" /> <font-face units-per-em="512" ascent="480" descent="-32" />
<missing-glyph horiz-adv-x="512" /> <missing-glyph horiz-adv-x="512" />
<glyph unicode="&#x20;" d="" horiz-adv-x="256" /> <glyph unicode="&#x20;" d="" horiz-adv-x="256" />
<glyph unicode="&#xf017;" d="M256 322.286v-128q0-4-2.571-6.572t-6.571-2.572h-91.428q-4 0-6.572 2.572t-2.571 6.572v18.286q0 4 2.571 6.572t6.572 2.571h64v100.572q0 4 2.571 6.572t6.571 2.571h18.286q4 0 6.572-2.571t2.572-6.572zM374.857 221.714q0 42.286-20.857 78t-56.572 56.571-78 20.857-78-20.857-56.572-56.571-20.857-78 20.857-78 56.572-56.572 78-20.857 78 20.857 56.572 56.572 20.857 78zM438.857 221.714q0-59.714-29.428-110.143t-79.857-79.857-110.143-29.428-110.143 29.428-79.857 79.857-29.428 110.143 29.428 110.143 79.857 79.857 110.143 29.428 110.143-29.428 79.857-79.857 29.428-110.143z" /> <glyph unicode="&#xe600;" d="M0 73.143v256q0 30.286 21.428 51.714t51.715 21.428h64l14.571 38.857q5.428 14 19.857 24.143t29.571 10.143h146.286q15.143 0 29.572-10.143t19.857-24.143l14.572-38.857h64q30.286 0 51.715-21.428t21.428-51.714v-256q0-30.286-21.428-51.714t-51.714-21.428h-402.286q-30.285 0-51.715 21.428t-21.428 51.714zM146.286 201.143q0-52.857 37.572-90.428t90.428-37.572 90.428 37.572 37.572 90.428-37.572 90.428-90.428 37.572-90.428-37.572-37.572-90.428zM192 201.143q0 34 24.143 58.143t58.143 24.143 58.143-24.143 24.143-58.143-24.143-58.143-58.143-24.143-58.143 24.143-24.143 58.143z" horiz-adv-x="549" />
<glyph unicode="&#xf073;" d="M36.572 0h82.285v82.286h-82.285v-82.286zM137.143 0h91.429v82.286h-91.428v-82.286zM36.572 100.572h82.285v91.428h-82.285v-91.428zM137.143 100.572h91.429v91.428h-91.428v-91.428zM36.572 210.286h82.285v82.286h-82.285v-82.286zM246.857 0h91.429v82.286h-91.428v-82.286zM137.143 210.286h91.429v82.286h-91.428v-82.286zM356.572 0h82.286v82.286h-82.286v-82.286zM246.857 100.572h91.429v91.428h-91.428v-91.428zM146.286 347.429v82.285q0 3.715-2.714 6.429t-6.428 2.714h-18.285q-3.715 0-6.428-2.714t-2.715-6.429v-82.285q0-3.714 2.715-6.428t6.428-2.714h18.285q3.714 0 6.428 2.714t2.714 6.428zM356.572 100.572h82.286v91.428h-82.286v-91.428zM246.857 210.286h91.429v82.286h-91.428v-82.286zM356.572 210.286h82.286v82.286h-82.286v-82.286zM365.714 347.429v82.285q0 3.715-2.714 6.429t-6.428 2.714h-18.286q-3.714 0-6.428-2.714t-2.714-6.429v-82.285q0-3.714 2.714-6.428t6.428-2.714h18.286q3.714 0 6.428 2.714t2.714 6.428zM475.428 365.714v-365.714q0-14.857-10.857-25.714t-25.714-10.857h-402.286q-14.857 0-25.715 10.857t-10.857 25.714v365.714q0 14.857 10.857 25.714t25.715 10.857h36.572v27.428q0 18.857 13.428 32.285t32.285 13.429h18.285q18.857 0 32.285-13.429t13.428-32.285v-27.428h109.714v27.428q0 18.857 13.428 32.285t32.286 13.429h18.286q18.857 0 32.286-13.429t13.428-32.285v-27.428h36.572q14.857 0 25.714-10.857t10.857-25.714z" horiz-adv-x="476" /> <glyph unicode="&#xe601;" d="M416 0l96 256h-416l-96-256zM64 288l-64-288v416h144l64-64h208v-64z" />
<glyph unicode="&#xe602;" d="M507.331 68.67c-0.002 0.002-0.004 0.004-0.006 0.005l-155.322 155.325 155.322 155.325c0.002 0.002 0.004 0.003 0.006 0.005 1.672 1.673 2.881 3.627 3.656 5.708 2.123 5.688 0.912 12.341-3.662 16.915l-73.373 73.373c-4.574 4.573-11.225 5.783-16.914 3.66-2.080-0.775-4.035-1.984-5.709-3.655 0-0.002-0.002-0.003-0.004-0.005l-155.324-155.326-155.324 155.325c-0.002 0.002-0.003 0.003-0.005 0.005-1.673 1.671-3.627 2.88-5.707 3.655-5.69 2.124-12.341 0.913-16.915-3.66l-73.374-73.374c-4.574-4.574-5.784-11.226-3.661-16.914 0.776-2.080 1.985-4.036 3.656-5.708 0.002-0.001 0.003-0.003 0.005-0.005l155.325-155.324-155.325-155.326c-0.001-0.002-0.003-0.003-0.004-0.005-1.671-1.673-2.88-3.627-3.657-5.707-2.124-5.688-0.913-12.341 3.661-16.915l73.374-73.373c4.575-4.574 11.226-5.784 16.915-3.661 2.080 0.776 4.035 1.985 5.708 3.656 0.001 0.002 0.003 0.003 0.005 0.005l155.324 155.325 155.324-155.325c0.002-0.001 0.004-0.003 0.006-0.004 1.674-1.672 3.627-2.881 5.707-3.657 5.689-2.123 12.342-0.913 16.914 3.661l73.373 73.374c4.574 4.574 5.785 11.227 3.662 16.915-0.776 2.080-1.985 4.034-3.657 5.707z" />
<glyph unicode="&#xe603;" d="M432 416l-240-240-112 112-80-80 192-192 320 320z" />
<glyph unicode="&#xf017;" d="M0 219.429q0 59.714 29.428 110.143t79.857 79.857 110.143 29.428 110.143-29.428 79.857-79.857 29.428-110.143-29.428-110.143-79.857-79.857-110.143-29.428-110.143 29.428-79.857 79.857-29.428 110.143zM64 219.429q0-42.286 20.857-78t56.571-56.572 78-20.857 78 20.857 56.572 56.572 20.857 78-20.857 78-56.572 56.572-78 20.857-78-20.857-56.572-56.572-20.857-78zM146.286 192v18.286q0 4 2.571 6.572t6.571 2.571h64v100.572q0 4 2.571 6.572t6.571 2.571h18.286q4 0 6.572-2.571t2.571-6.572v-128q0-4-2.571-6.572t-6.572-2.572h-91.428q-4 0-6.572 2.572t-2.571 6.572z" />
<glyph unicode="&#xf073;" d="M0 0v365.714q0 14.857 10.857 25.714t25.715 10.857h36.572v27.429q0 18.857 13.428 32.286t32.285 13.428h18.285q18.857 0 32.286-13.428t13.428-32.286v-27.429h109.714v27.429q0 18.857 13.428 32.286t32.286 13.428h18.286q18.857 0 32.286-13.428t13.428-32.286v-27.429h36.572q14.857 0 25.714-10.857t10.857-25.714v-365.714q0-14.857-10.857-25.714t-25.714-10.857h-402.286q-14.857 0-25.715 10.857t-10.857 25.714zM36.572 0h82.285v82.286h-82.285v-82.286zM36.572 100.572h82.285v91.428h-82.285v-91.428zM36.572 210.286h82.285v82.286h-82.285v-82.286zM109.715 347.429q0-3.714 2.715-6.428t6.428-2.714h18.285q3.714 0 6.429 2.714t2.714 6.428v82.286q0 3.714-2.714 6.428t-6.428 2.714h-18.285q-3.715 0-6.428-2.714t-2.715-6.428v-82.286zM137.143 0h91.429v82.286h-91.428v-82.286zM137.143 100.572h91.429v91.428h-91.428v-91.428zM137.143 210.286h91.429v82.286h-91.428v-82.286zM246.857 0h91.429v82.286h-91.428v-82.286zM246.857 100.572h91.429v91.428h-91.428v-91.428zM246.857 210.286h91.429v82.286h-91.428v-82.286zM329.143 347.429q0-3.714 2.714-6.428t6.428-2.714h18.286q3.714 0 6.428 2.714t2.714 6.428v82.286q0 3.714-2.714 6.428t-6.428 2.714h-18.286q-3.714 0-6.428-2.714t-2.714-6.428v-82.286zM356.572 0h82.286v82.286h-82.286v-82.286zM356.572 100.572h82.286v91.428h-82.286v-91.428zM356.572 210.286h82.286v82.286h-82.286v-82.286z" horiz-adv-x="476" />
</font></defs></svg> </font></defs></svg>

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -112,10 +112,11 @@ webshims.register('track', function($, webshims, window, document, undefined){
var copyName = {srclang: 'language'}; var copyName = {srclang: 'language'};
var updateMediaTrackList = function(baseData, trackList){ var updateMediaTrackList = function(baseData, trackList){
var i, len;
var callChange = false;
var removed = []; var removed = [];
var added = []; var added = [];
var newTracks = []; var newTracks = [];
var i, len;
if(!baseData){ if(!baseData){
baseData = webshims.data(this, 'mediaelementBase') || webshims.data(this, 'mediaelementBase', {}); baseData = webshims.data(this, 'mediaelementBase') || webshims.data(this, 'mediaelementBase', {});
} }
@ -150,12 +151,13 @@ webshims.register('track', function($, webshims, window, document, undefined){
removed.push(trackList[i]); removed.push(trackList[i]);
} }
} }
if(removed.length || added.length){ if(removed.length || added.length){
trackList.splice(0); trackList.splice(0);
for(i = 0, len = newTracks.length; i < len; i++){ for(i = 0, len = newTracks.length; i < len; i++){
trackList.push(newTracks[i]); trackList.push(newTracks[i]);
} }
for(i = 0, len = removed.length; i < len; i++){ for(i = 0, len = removed.length; i < len; i++){
$([trackList]).triggerHandler($.Event({type: 'removetrack', track: removed[i]})); $([trackList]).triggerHandler($.Event({type: 'removetrack', track: removed[i]}));
@ -168,6 +170,16 @@ webshims.register('track', function($, webshims, window, document, undefined){
$(this).triggerHandler('updatetrackdisplay'); $(this).triggerHandler('updatetrackdisplay');
} }
} }
for(i = 0, len = trackList.length; i < len; i++){
if(trackList[i].__wsmode != trackList[i].mode){
trackList[i].__wsmode = trackList[i].mode;
callChange = true;
}
}
if(callChange){
$([trackList]).triggerHandler('change');
}
}; };
var refreshTrack = function(track, trackData){ var refreshTrack = function(track, trackData){

View File

@ -99,8 +99,8 @@ webshim.register('url', function($, webshims, window, document, undefined, optio
name = bytes; name = bytes;
value = ''; value = '';
} }
name = name.replace('+', ' '); name = name.replace(/\+/g, ' ');
value = value.replace('+', ' '); value = value.replace(/\+/g, ' ');
pairs.push({ name: name, value: value }); pairs.push({ name: name, value: value });
}); });
var output = []; var output = [];
@ -110,7 +110,7 @@ webshim.register('url', function($, webshims, window, document, undefined, optio
value: decodeURIComponent(pair.value) value: decodeURIComponent(pair.value)
}); });
}); });
return output; // Spec bug? return output;
} }
function URLSearchParams(url_object, init) { function URLSearchParams(url_object, init) {
@ -142,10 +142,10 @@ webshim.register('url', function($, webshims, window, document, undefined, optio
output += name + '=' + value; output += name + '=' + value;
first = false; first = false;
}); });
return output; return output.replace(/%20/g, '+');
} }
webshim.defineProperties(this, { Object.defineProperties(this, {
append: { append: {
value: function (name, value) { value: function (name, value) {
pairs.push({ name: name, value: value }); pairs.push({ name: name, value: value });
@ -203,6 +203,7 @@ webshim.register('url', function($, webshims, window, document, undefined, optio
if (pairs[i].name === name) { if (pairs[i].name === name) {
if (!found) { if (!found) {
pairs[i].value = value; pairs[i].value = value;
found = true;
++i; ++i;
} else { } else {
pairs.splice(i, 1); pairs.splice(i, 1);
@ -211,6 +212,10 @@ webshim.register('url', function($, webshims, window, document, undefined, optio
++i; ++i;
} }
} }
if (!found)
pairs.push({ name: name, value: value });
updateSteps(); updateSteps();
} }
}, },
@ -226,7 +231,7 @@ webshim.register('url', function($, webshims, window, document, undefined, optio
var queryObject = new URLSearchParams( var queryObject = new URLSearchParams(
self, instance.search ? instance.search.substring(1) : null); self, instance.search ? instance.search.substring(1) : null);
webshim.defineProperties(self, { Object.defineProperties(self, {
href: { href: {
get: function () { return instance.href; }, get: function () { return instance.href; },
set: function (v) { instance.href = v; tidy_instance(); update_steps(); } set: function (v) { instance.href = v; tidy_instance(); update_steps(); }
@ -287,6 +292,12 @@ webshim.register('url', function($, webshims, window, document, undefined, optio
hash: { hash: {
get: function () { return instance.hash; }, get: function () { return instance.hash; },
set: function (v) { instance.hash = v; tidy_instance(); } set: function (v) { instance.hash = v; tidy_instance(); }
},
toString: {
value: function() { return instance.toString(); }
},
valueOf: {
value: function() { return instance.valueOf(); }
} }
}); });
@ -299,7 +310,7 @@ webshim.register('url', function($, webshims, window, document, undefined, optio
function update_steps() { function update_steps() {
queryObject._setPairs(instance.search ? parse(instance.search.substring(1)) : []); queryObject._setPairs(instance.search ? parse(instance.search.substring(1)) : []);
queryObject._updateSteps(); queryObject._updateSteps();
} };
return self; return self;
}; };

View File

@ -52,7 +52,7 @@ class EventsControllerTest < ActionController::TestCase
assert_empty assigns(:event).errors.messages assert_empty assigns(:event).errors.messages
end end
assert_redirected_to root_url assert_redirected_to :root
end end
test 'should not create event' do test 'should not create event' do
@ -75,7 +75,7 @@ class EventsControllerTest < ActionController::TestCase
test 'should not get edit' do test 'should not get edit' do
get :edit, id: @event get :edit, id: @event
assert_redirected_to root_url assert_redirected_to :root
end end
test 'should preview' do test 'should preview' do
@ -125,6 +125,6 @@ class EventsControllerTest < ActionController::TestCase
delete :destroy, id: @event, secret: @event.secret delete :destroy, id: @event, secret: @event.secret
end end
assert_redirected_to events_path assert_redirected_to :root
end end
end end

View File

@ -29,7 +29,7 @@ class ModerationsControllerTest < ActionController::TestCase
title: 'hello world', title: 'hello world',
related_region: regions(:region_one) related_region: regions(:region_one)
} }
assert_redirected_to moderations_path assert_redirected_to :moderations
end end
test 'should not edit event' do test 'should not edit event' do
@ -54,7 +54,7 @@ class ModerationsControllerTest < ActionController::TestCase
assert decision < assigns(:moderation).decision_time assert decision < assigns(:moderation).decision_time
assert_redirected_to moderations_path assert_redirected_to :moderations
end end
test 'should update event' do test 'should update event' do
@ -69,7 +69,7 @@ class ModerationsControllerTest < ActionController::TestCase
} }
assert_empty assigns(:moderation).errors assert_empty assigns(:moderation).errors
assert_redirected_to moderations_path assert_redirected_to :moderations
end end
test 'should not update event' do test 'should not update event' do
@ -95,7 +95,7 @@ class ModerationsControllerTest < ActionController::TestCase
assert_empty assigns(:moderation).errors assert_empty assigns(:moderation).errors
assert_redirected_to moderations_path assert_redirected_to :moderations
end end
test 'should reject event with a reason' do test 'should reject event with a reason' do
@ -105,6 +105,6 @@ class ModerationsControllerTest < ActionController::TestCase
assert_empty assigns(:moderation).errors assert_empty assigns(:moderation).errors
assert_redirected_to moderations_path assert_redirected_to :moderations
end end
end end

View File

@ -74,11 +74,11 @@ class EventTest < ActiveSupport::TestCase
assert @event.moderated?, @event.errors.messages assert @event.moderated?, @event.errors.messages
end end
test 'named scope future.in' do test 'named scope future.daylimit' do
assert Event.respond_to? :future assert Event.respond_to? :future
assert Event.respond_to? :in assert Event.respond_to? :daylimit
assert_match(/<= end_time/, Event.future.in(nil).where_values[0]) assert_match(/<= end_time/, Event.future.daylimit(nil).where_values[0])
assert_match(/end_time <=/, Event.future.in(nil).where_values[1]) assert_match(/end_time <=/, Event.future.daylimit(nil).where_values[1])
end end
test 'named scope year' do test 'named scope year' do