Instiki 0.16.5
Update to Rails 2.3.2 (the stable Rails 2.3 release). Add audio/speex support Update CHANGELOG Bump version number
This commit is contained in:
parent
801d307405
commit
e2ccdfd812
264 changed files with 4850 additions and 1906 deletions
|
@ -121,7 +121,7 @@ module ActionView
|
|||
if (obj = (object.respond_to?(:errors) ? object : instance_variable_get("@#{object}"))) &&
|
||||
(errors = obj.errors.on(method))
|
||||
content_tag("div",
|
||||
"#{options[:prepend_text]}#{errors.is_a?(Array) ? errors.first : errors}#{options[:append_text]}",
|
||||
"#{options[:prepend_text]}#{ERB::Util.html_escape(errors.is_a?(Array) ? errors.first : errors)}#{options[:append_text]}",
|
||||
:class => options[:css_class]
|
||||
)
|
||||
else
|
||||
|
@ -198,7 +198,7 @@ module ActionView
|
|||
locale.t :header, :count => count, :model => object_name
|
||||
end
|
||||
message = options.include?(:message) ? options[:message] : locale.t(:body)
|
||||
error_messages = objects.sum {|object| object.errors.full_messages.map {|msg| content_tag(:li, msg) } }.join
|
||||
error_messages = objects.sum {|object| object.errors.full_messages.map {|msg| content_tag(:li, ERB::Util.html_escape(msg)) } }.join
|
||||
|
||||
contents = ''
|
||||
contents << content_tag(options[:header_tag] || :h2, header_message) unless header_message.blank?
|
||||
|
|
|
@ -876,8 +876,8 @@ module ActionView
|
|||
input_name_from_type(type).gsub(/([\[\(])|(\]\[)/, '_').gsub(/[\]\)]/, '')
|
||||
end
|
||||
|
||||
# Given an ordering of datetime components, create the selection html
|
||||
# and join them with their appropriate seperators
|
||||
# Given an ordering of datetime components, create the selection HTML
|
||||
# and join them with their appropriate separators.
|
||||
def build_selects_from_types(order)
|
||||
select = ''
|
||||
order.reverse.each do |type|
|
||||
|
|
|
@ -360,8 +360,8 @@ module ActionView
|
|||
end
|
||||
|
||||
if confirm = options.delete("confirm")
|
||||
options["onclick"] ||= ''
|
||||
options["onclick"] << "return #{confirm_javascript_function(confirm)};"
|
||||
options["onclick"] ||= 'return true;'
|
||||
options["onclick"] = "if (!#{confirm_javascript_function(confirm)}) return false; #{options['onclick']}"
|
||||
end
|
||||
|
||||
tag :input, { "type" => "submit", "name" => "commit", "value" => value }.update(options.stringify_keys)
|
||||
|
|
|
@ -15,6 +15,7 @@ module ActionView
|
|||
# * <tt>:country_code</tt> - Sets the country code for the phone number.
|
||||
#
|
||||
# ==== Examples
|
||||
# number_to_phone(5551234) # => 555-1234
|
||||
# number_to_phone(1235551234) # => 123-555-1234
|
||||
# number_to_phone(1235551234, :area_code => true) # => (123) 555-1234
|
||||
# number_to_phone(1235551234, :delimiter => " ") # => 123 555 1234
|
||||
|
@ -37,7 +38,8 @@ module ActionView
|
|||
str << if area_code
|
||||
number.gsub!(/([0-9]{1,3})([0-9]{3})([0-9]{4}$)/,"(\\1) \\2#{delimiter}\\3")
|
||||
else
|
||||
number.gsub!(/([0-9]{1,3})([0-9]{3})([0-9]{4})$/,"\\1#{delimiter}\\2#{delimiter}\\3")
|
||||
number.gsub!(/([0-9]{0,3})([0-9]{3})([0-9]{4})$/,"\\1#{delimiter}\\2#{delimiter}\\3")
|
||||
number.starts_with?('-') ? number.slice!(1..-1) : number
|
||||
end
|
||||
str << " x #{extension}" unless extension.blank?
|
||||
str
|
||||
|
@ -138,7 +140,7 @@ module ActionView
|
|||
# number_with_delimiter(12345678) # => 12,345,678
|
||||
# number_with_delimiter(12345678.05) # => 12,345,678.05
|
||||
# number_with_delimiter(12345678, :delimiter => ".") # => 12.345.678
|
||||
# number_with_delimiter(12345678, :seperator => ",") # => 12,345,678
|
||||
# number_with_delimiter(12345678, :separator => ",") # => 12,345,678
|
||||
# number_with_delimiter(98765432.98, :delimiter => " ", :separator => ",")
|
||||
# # => 98 765 432,98
|
||||
#
|
||||
|
|
|
@ -107,7 +107,7 @@ module ActionView
|
|||
# on the page in an Ajax response.
|
||||
module PrototypeHelper
|
||||
unless const_defined? :CALLBACKS
|
||||
CALLBACKS = Set.new([ :uninitialized, :loading, :loaded,
|
||||
CALLBACKS = Set.new([ :create, :uninitialized, :loading, :loaded,
|
||||
:interactive, :complete, :failure, :success ] +
|
||||
(100..599).to_a)
|
||||
AJAX_OPTIONS = Set.new([ :before, :after, :condition, :url,
|
||||
|
|
|
@ -536,8 +536,9 @@ module ActionView
|
|||
text.gsub(AUTO_LINK_RE) do
|
||||
href = $&
|
||||
punctuation = ''
|
||||
# detect already linked URLs
|
||||
if $` =~ /<a\s[^>]*href="$/
|
||||
left, right = $`, $'
|
||||
# detect already linked URLs and URLs in the middle of a tag
|
||||
if left =~ /<[^>]+$/ && right =~ /^[^>]*>/
|
||||
# do not change string; URL is alreay linked
|
||||
href
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue