Removed country chooser widget

This commit is contained in:
severin
2014-01-05 15:01:14 +01:00
parent 191a00649f
commit 514a44e022
11 changed files with 33 additions and 2477 deletions

View File

@@ -0,0 +1,28 @@
note
description: "Summary description for {WSF_DATETIME_CONTROL}."
author: ""
date: "$Date$"
revision: "$Revision$"
class
WSF_DATETIME_CONTROL
inherit
WSF_INPUT_CONTROL
rename
make as make_input
end
create
make
feature {NONE} -- Initialization
make (v: STRING)
-- Initialize with specified control name and text
do
make_input (v)
end
end

View File

@@ -26,13 +26,13 @@ create
feature {NONE} -- Initialization feature {NONE} -- Initialization
make (a_label: detachable STRING; c: WSF_VALUE_CONTROL [G]) make (a_label: detachable STRING; c: WSF_VALUE_CONTROL [G])
-- Initialize form element control with a specific label and value control -- Initialize form element control with a specific label (or 'Void' for no label) and value control
do do
make_with_validators (a_label, c, create {ARRAYED_LIST [WSF_VALIDATOR [G]]}.make (0)) make_with_validators (a_label, c, create {ARRAYED_LIST [WSF_VALIDATOR [G]]}.make (0))
end end
make_with_validators (a_label: detachable STRING; c: WSF_VALUE_CONTROL [G]; v: LIST [WSF_VALIDATOR [G]]) make_with_validators (a_label: detachable STRING; c: WSF_VALUE_CONTROL [G]; v: LIST [WSF_VALIDATOR [G]])
-- Initialize form element control with a specific label, value control and list of validators -- Initialize form element control with a specific label (or 'Void' for no label), value control and list of validators
do do
make_control ("div") make_control ("div")
add_class ("form-group") add_class ("form-group")

View File

@@ -1,73 +0,0 @@
note
description: "Summary description for {WSF_COUNTRY_CHOOSER_CONTROL}."
author: ""
date: "$Date$"
revision: "$Revision$"
class
WSF_COUNTRY_CHOOSER_CONTROL
inherit
WSF_MULTI_CONTROL [WSF_STATELESS_CONTROL]
rename
make as make_multi_control,
make_with_tag_name as make_multi_control_with_tag_name
select
make_control
end
WSF_VALUE_CONTROL [STRING]
undefine
load_state,
full_state,
read_state_changes,
make
end
create
make
feature {NONE} -- Initialization
make (t: STRING)
-- Make a country chooser control with specified tag name (such as li) and menu title
local
temp: WSF_MULTI_CONTROL [WSF_STATELESS_CONTROL]
options: WSF_MULTI_CONTROL [WSF_STATELESS_CONTROL]
listbox: WSF_MULTI_CONTROL [WSF_STATELESS_CONTROL]
do
make_multi_control_with_tag_name (t)
add_class ("bfh-selectbox bfh-countries")
append_attribute ("data-country=%"US%" data-flags=%"true%"")
create input.make ("")
input.append_attribute ("type=%"hidden%"")
add_control (input)
create temp.make_with_tag_name ("a")
temp.add_class ("bfh-selectbox-toggle")
temp.append_attribute ("role=%"button%" data-toggle=%"bfh-selectbox%" href=%"#%"")
temp.add_control (create {WSF_BASIC_CONTROL}.make_with_body_class ("span", "data-option=%"%"", "bfh-selectbox-option input-medium", ""))
temp.add_control (create {WSF_BASIC_CONTROL}.make_with_body ("b", "style=%"border-top-color: black !important;%"", ""))
add_control (temp)
create options.make
options.add_class ("bfh-selectbox-options")
options.add_control (create {WSF_BASIC_CONTROL}.make_with_body_class ("input", "type=%"text%"", "bfh-selectbox-filter", ""))
create listbox.make
listbox.append_attribute ("role=%"listbox%"")
listbox.add_control (create {WSF_BASIC_CONTROL}.make_with_body ("ul", "role=%"option%"", ""))
options.add_control (listbox)
add_control (options)
end
feature -- Implementation
value: STRING
do
Result := input.value
end
feature -- Properties
input: WSF_INPUT_CONTROL
end

View File

@@ -40,7 +40,7 @@ feature {NONE} -- Initialization
append_attribute ("data-date=%"10-09-2013%" data-date-format=%"dd-mm-yyyy%"") append_attribute ("data-date=%"10-09-2013%" data-date-format=%"dd-mm-yyyy%"")
create input.make ("10-09-2013") create input.make ("10-09-2013")
input.add_class ("form-control") input.add_class ("form-control")
input.append_attribute ("value=%"10-09-2013%" type=%"text%" size=%"16%" readonly=%"%"") input.append_attribute ("size=%"16%" readonly=%"%"")
add_control (input) add_control (input)
create span.make_with_tag_name ("span") create span.make_with_tag_name ("span")
span.add_class ("input-group-addon") span.add_class ("input-group-addon")
@@ -57,6 +57,6 @@ feature -- Implementation
feature -- Properties feature -- Properties
input: WSF_INPUT_CONTROL input: WSF_DATETIME_CONTROL
end end

View File

@@ -1,261 +0,0 @@
/* ==========================================================
* bootstrap-formhelpers-countries.en_US.js
* https://github.com/vlamanna/BootstrapFormHelpers
* ==========================================================
* Copyright 2012 Vincent Lamanna
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================== */
var BFHCountriesList = {
'AF': 'Afghanistan',
'AL': 'Albania',
'DZ': 'Algeria',
'AS': 'American Samoa',
'AD': 'Andorra',
'AO': 'Angola',
'AI': 'Anguilla',
'AQ': 'Antarctica' ,
'AG': 'Antigua and Barbuda' ,
'AR': 'Argentina' ,
'AM': 'Armenia' ,
'AW': 'Aruba' ,
'AU': 'Australia' ,
'AT': 'Austria' ,
'AZ': 'Azerbaijan' ,
'BH': 'Bahrain' ,
'BD': 'Bangladesh',
'BB': 'Barbados' ,
'BY': 'Belarus',
'BE': 'Belgium',
'BZ': 'Belize',
'BJ': 'Benin',
'BM': 'Bermuda',
'BT': 'Bhutan',
'BO': 'Bolivia',
'BA': 'Bosnia and Herzegovina',
'BW': 'Botswana',
'BV': 'Bouvet Island',
'BR': 'Brazil',
'IO': 'British Indian Ocean Territory',
'VG': 'British Virgin Islands',
'BN': 'Brunei',
'BG': 'Bulgaria',
'BF': 'Burkina Faso',
'BI': 'Burundi',
'CI': 'Côte d\'Ivoire',
'KH': 'Cambodia',
'CM': 'Cameroon',
'CA': 'Canada',
'CV': 'Cape Verde',
'KY': 'Cayman Islands',
'CF': 'Central African Republic',
'TD': 'Chad',
'CL': 'Chile',
'CN': 'China',
'CX': 'Christmas Island',
'CC': 'Cocos (Keeling) Islands',
'CO': 'Colombia',
'KM': 'Comoros',
'CG': 'Congo',
'CK': 'Cook Islands',
'CR': 'Costa Rica',
'HR': 'Croatia',
'CU': 'Cuba',
'CY': 'Cyprus',
'CZ': 'Czech Republic',
'CD': 'Democratic Republic of the Congo',
'DK': 'Denmark',
'DJ': 'Djibouti',
'DM': 'Dominica',
'DO': 'Dominican Republic',
'TP': 'East Timor',
'EC': 'Ecuador',
'EG': 'Egypt',
'SV': 'El Salvador',
'GQ': 'Equatorial Guinea',
'ER': 'Eritrea',
'EE': 'Estonia',
'ET': 'Ethiopia',
'FO': 'Faeroe Islands',
'FK': 'Falkland Islands',
'FJ': 'Fiji',
'FI': 'Finland',
'MK': 'Former Yugoslav Republic of Macedonia',
'FR': 'France',
'FX': 'France, Metropolitan',
'GF': 'French Guiana',
'PF': 'French Polynesia',
'TF': 'French Southern Territories',
'GA': 'Gabon',
'GE': 'Georgia',
'DE': 'Germany',
'GH': 'Ghana',
'GI': 'Gibraltar',
'GR': 'Greece',
'GL': 'Greenland',
'GD': 'Grenada',
'GP': 'Guadeloupe',
'GU': 'Guam',
'GT': 'Guatemala',
'GN': 'Guinea',
'GW': 'Guinea-Bissau',
'GY': 'Guyana',
'HT': 'Haiti',
'HM': 'Heard and Mc Donald Islands',
'HN': 'Honduras',
'HK': 'Hong Kong',
'HU': 'Hungary',
'IS': 'Iceland',
'IN': 'India',
'ID': 'Indonesia',
'IR': 'Iran',
'IQ': 'Iraq',
'IE': 'Ireland',
'IL': 'Israel',
'IT': 'Italy',
'JM': 'Jamaica',
'JP': 'Japan',
'JO': 'Jordan',
'KZ': 'Kazakhstan',
'KE': 'Kenya',
'KI': 'Kiribati',
'KW': 'Kuwait',
'KG': 'Kyrgyzstan',
'LA': 'Laos',
'LV': 'Latvia',
'LB': 'Lebanon',
'LS': 'Lesotho',
'LR': 'Liberia',
'LY': 'Libya',
'LI': 'Liechtenstein',
'LT': 'Lithuania',
'LU': 'Luxembourg',
'MO': 'Macau',
'MG': 'Madagascar',
'MW': 'Malawi',
'MY': 'Malaysia',
'MV': 'Maldives',
'ML': 'Mali',
'MT': 'Malta',
'MH': 'Marshall Islands',
'MQ': 'Martinique',
'MR': 'Mauritania',
'MU': 'Mauritius',
'MT': 'Mayotte',
'MX': 'Mexico',
'FM': 'Micronesia',
'MD': 'Moldova',
'MC': 'Monaco',
'MN': 'Mongolia',
'ME': 'Montenegro',
'MS': 'Montserrat',
'MA': 'Morocco',
'MZ': 'Mozambique',
'MM': 'Myanmar',
'NA': 'Namibia',
'NR': 'Nauru',
'NP': 'Nepal',
'NL': 'Netherlands',
'AN': 'Netherlands Antilles',
'NC': 'New Caledonia',
'NZ': 'New Zealand',
'NI': 'Nicaragua',
'NE': 'Niger',
'NG': 'Nigeria',
'NU': 'Niue',
'NF': 'Norfolk Island',
'KP': 'North Korea',
'MP': 'Northern Marianas',
'NO': 'Norway',
'OM': 'Oman',
'PK': 'Pakistan',
'PW': 'Palau',
'PA': 'Panama',
'PG': 'Papua New Guinea',
'PY': 'Paraguay',
'PE': 'Peru',
'PH': 'Philippines',
'PN': 'Pitcairn Islands',
'PL': 'Poland',
'PT': 'Portugal',
'PR': 'Puerto Rico',
'QA': 'Qatar',
'RE': 'Reunion',
'RO': 'Romania',
'RU': 'Russia',
'RW': 'Rwanda',
'ST': 'São Tomé and Príncipe',
'SH': 'Saint Helena',
'PM': 'St. Pierre and Miquelon',
'KN': 'Saint Kitts and Nevis',
'LC': 'Saint Lucia',
'VC': 'Saint Vincent and the Grenadines',
'WS': 'Samoa',
'SM': 'San Marino',
'SA': 'Saudi Arabia',
'SN': 'Senegal',
'RS': 'Serbia',
'SC': 'Seychelles',
'SL': 'Sierra Leone',
'SG': 'Singapore',
'SK': 'Slovakia',
'SI': 'Slovenia',
'SB': 'Solomon Islands',
'SO': 'Somalia',
'ZA': 'South Africa',
'GS': 'South Georgia and the South Sandwich Islands',
'KR': 'South Korea',
'ES': 'Spain',
'LK': 'Sri Lanka',
'SD': 'Sudan',
'SR': 'Suriname',
'SJ': 'Svalbard and Jan Mayen Islands',
'SZ': 'Swaziland',
'SE': 'Sweden',
'CH': 'Switzerland',
'SY': 'Syria',
'TW': 'Taiwan',
'TJ': 'Tajikistan',
'TZ': 'Tanzania',
'TH': 'Thailand',
'BS': 'The Bahamas',
'GM': 'The Gambia',
'TG': 'Togo',
'TK': 'Tokelau',
'TO': 'Tonga',
'TT': 'Trinidad and Tobago',
'TN': 'Tunisia',
'TR': 'Turkey',
'TM': 'Turkmenistan',
'TC': 'Turks and Caicos Islands',
'TV': 'Tuvalu',
'VI': 'US Virgin Islands',
'UG': 'Uganda',
'UA': 'Ukraine',
'AE': 'United Arab Emirates',
'GB': 'United Kingdom',
'US': 'United States',
'UM': 'United States Minor Outlying Islands',
'UY': 'Uruguay',
'UZ': 'Uzbekistan',
'VU': 'Vanuatu',
'VA': 'Vatican City',
'VE': 'Venezuela',
'VN': 'Vietnam',
'WF': 'Wallis and Futuna Islands',
'EH': 'Western Sahara',
'YE': 'Yemen',
'ZM': 'Zambia',
'ZW': 'Zimbabwe'
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,155 +0,0 @@
/* ==========================================================
* bootstrap-formhelpers-countries.js
* https://github.com/vlamanna/BootstrapFormHelpers
* ==========================================================
* Copyright 2012 Vincent Lamanna
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================== */
!function ($) {
"use strict"; // jshint ;_;
/* COUNTRIES CLASS DEFINITION
* ====================== */
var BFHCountries = function (element, options) {
this.options = $.extend({}, $.fn.bfhcountries.defaults, options)
this.$element = $(element)
if (this.options.countrylist) {
this.countryList = []
this.options.countrylist = this.options.countrylist.split(',')
for (var country in BFHCountriesList) {
if ($.inArray(country, this.options.countrylist) >= 0) {
this.countryList[country] = BFHCountriesList[country]
}
}
} else {
this.countryList = BFHCountriesList
}
if (this.$element.is("select")) {
this.addCountries()
}
if (this.$element.is("span")) {
this.displayCountry()
}
if (this.$element.hasClass("bfh-selectbox")) {
this.addBootstrapCountries()
}
}
BFHCountries.prototype = {
constructor: BFHCountries
, addCountries: function () {
var value = this.options.country
this.$element.html('')
this.$element.append('<option value=""></option>')
for (var country in this.countryList) {
this.$element.append('<option value="' + country + '">' + this.countryList[country] + '</option>')
}
this.$element.val(value)
}
, addBootstrapCountries: function() {
var $input
, $toggle
, $options
var value = this.options.country
$input = this.$element.find('input[type="hidden"]')
$toggle = this.$element.find('.bfh-selectbox-option')
$options = this.$element.find('[role=option]')
$options.html('')
$options.append('<li><a tabindex="-1" href="#" data-option=""></a></li>')
for (var country in this.countryList) {
if (this.options.flags == true) {
$options.append('<li><a tabindex="-1" href="#" data-option="' + country + '"><i class="icon-flag-' + country + '"></i>' + this.countryList[country] + '</a></li>')
} else {
$options.append('<li><a tabindex="-1" href="#" data-option="' + country + '">' + this.countryList[country] + '</a></li>')
}
}
$toggle.data('option', value)
if (value) {
if (this.options.flags == true) {
$toggle.html('<i class="icon-flag-' + value + '"></i> ' + this.countryList[value])
} else {
$toggle.html(this.countryList[value])
}
}
$input.val(value)
}
, displayCountry: function () {
var value = this.options.country
if (this.options.flags == true) {
this.$element.html('<i class="icon-flag-' + value + '"></i> ' + this.countryList[value])
} else {
this.$element.html(this.countryList[value])
}
}
}
/* COUNTRY PLUGIN DEFINITION
* ======================= */
$.fn.bfhcountries = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('bfhcountries')
, options = typeof option == 'object' && option
if (!data) $this.data('bfhcountries', (data = new BFHCountries(this, options)))
if (typeof option == 'string') data[option]()
})
}
$.fn.bfhcountries.Constructor = BFHCountries
$.fn.bfhcountries.defaults = {
country: "",
countryList: "",
flags: false
}
/* COUNTRY DATA-API
* ============== */
$(window).on('load', function () {
$('form select.bfh-countries, span.bfh-countries, div.bfh-countries').each(function () {
var $countries = $(this)
$countries.bfhcountries($countries.data())
})
})
}(window.jQuery);

View File

@@ -1,244 +0,0 @@
/* ==========================================================
* bootstrap-formhelpers-selectbox.js
* https://github.com/vlamanna/BootstrapFormHelpers
* ==========================================================
* Copyright 2012 Vincent Lamanna
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================== */
!function ($) {
"use strict"; // jshint ;_;
/* SELECTBOX CLASS DEFINITION
* ========================= */
var toggle = '[data-toggle=bfh-selectbox]'
, BFHSelectBox = function (element) {
}
BFHSelectBox.prototype = {
constructor: BFHSelectBox
, toggle: function (e) {
var $this = $(this)
, $parent
, isActive
if ($this.is('.disabled, :disabled')) return false
$parent = getParent($this)
isActive = $parent.hasClass('open')
clearMenus()
if (!isActive) {
$parent.toggleClass('open')
$parent.find('[role=option] > li > [data-option="' + $this.find('.bfh-selectbox-option').data('option') + '"]').focus()
}
return false
}
, filter: function(e) {
var $this
, $parent
, $items
$this = $(this)
$parent = $this.closest('.bfh-selectbox')
$items = $('[role=option] li a', $parent)
$items.hide()
$items.filter(function() { return ($(this).text().toUpperCase().indexOf($this.val().toUpperCase()) != -1) }).show()
}
, keydown: function (e) {
var $this
, $items
, $active
, $parent
, isActive
, index
if (!/(38|40|27)/.test(e.keyCode) && !/[A-z]/.test(String.fromCharCode(e.which))) return
$this = $(this)
e.preventDefault()
e.stopPropagation()
if ($this.is('.disabled, :disabled')) return false
$parent = $this.closest('.bfh-selectbox')
isActive = $parent.hasClass('open')
if (!isActive || (isActive && e.keyCode == 27)) return $this.click()
$items = $('[role=option] li a', $parent).filter(':visible')
if (!$items.length) return
$('body').off('mouseenter.bfh-selectbox.data-api', '[role=option] > li > a', BFHSelectBox.prototype.mouseenter)
index = $items.index($items.filter(':focus'))
if (e.keyCode == 38 && index > 0) index-- // up
if (e.keyCode == 40 && index < $items.length - 1) index++ // down
if (/[A-z]/.test(String.fromCharCode(e.which))) {
var $subItems = $items.filter(function() { return ($(this).text().charAt(0).toUpperCase() == String.fromCharCode(e.which)) })
var selectedIndex = $subItems.index($subItems.filter(':focus'))
if (!~selectedIndex) index = $items.index($subItems)
else if (selectedIndex >= $subItems.length - 1) index = $items.index($subItems)
else index++
}
if (!~index) index = 0
$items
.eq(index)
.focus()
$('body').on('mouseenter.bfh-selectbox.data-api', '[role=option] > li > a', BFHSelectBox.prototype.mouseenter)
}
, mouseenter: function (e) {
var $this
$this = $(this)
if ($this.is('.disabled, :disabled')) return false
$this.focus()
}
, select: function (e) {
var $this
, $parent
, $toggle
, $input
$this = $(this)
e.preventDefault()
e.stopPropagation()
if ($this.is('.disabled, :disabled')) return false
$parent = $this.closest('.bfh-selectbox')
$toggle = $parent.find('.bfh-selectbox-option')
$input = $parent.find('input[type="hidden"]')
$toggle.data('option', $this.data('option'))
$toggle.html($this.html())
$input.removeData()
$input.val($this.data('option'))
$.each($this.data(), function(i,e) {
$input.data(i,e);
});
$input.change()
clearMenus()
}
}
function clearMenus() {
getParent($(toggle))
.removeClass('open')
}
function getParent($this) {
var selector = $this.attr('data-target')
, $parent
if (!selector) {
selector = $this.attr('href')
selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
}
$parent = $(selector)
$parent.length || ($parent = $this.parent())
return $parent
}
/* SELECTBOX PLUGIN DEFINITION
* ========================== */
$.fn.bfhselectbox = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('bfhselectbox')
this.type = 'bfhselectbox';
if (!data) $this.data('bfhselectbox', (data = new BFHSelectBox(this)))
if (typeof option == 'string') data[option].call($this)
})
}
$.fn.bfhselectbox.Constructor = BFHSelectBox
var origHook
// There might already be valhooks for the "text" type
if ($.valHooks.div){
// Preserve the original valhook function
origHook = $.valHooks.div
}
$.valHooks.div = {
get: function(el) {
if($(el).hasClass("bfh-selectbox")){
return $(el).find('input[type="hidden"]').val()
}else if (origHook){
return origHook.get(el)
}
},
set: function(el, val) {
if($(el).hasClass("bfh-selectbox")){
var $el = $(el)
, text = $el.find("li a[data-option='"+val+"']").text()
$el.find('input[type="hidden"]').val(val)
$el.find('.bfh-selectbox-option').text(text)
}else if (origHook){
return origHook.set(el,val)
}
}
}
/* APPLY TO STANDARD SELECTBOX ELEMENTS
* =================================== */
$(function () {
$('html')
.on('click.bfhselectbox.data-api', clearMenus)
$('body')
.on('click.bfhselectbox.data-api touchstart.bfhselectbox.data-api' , toggle, BFHSelectBox.prototype.toggle)
.on('keydown.bfhselectbox.data-api', toggle + ', [role=option]' , BFHSelectBox.prototype.keydown)
.on('mouseenter.bfhselectbox.data-api', '[role=option] > li > a', BFHSelectBox.prototype.mouseenter)
.on('click.bfhselectbox.data-api', '[role=option] > li > a', BFHSelectBox.prototype.select)
.on('click.bfhselectbox.data-api', '.bfh-selectbox-filter', function (e) { return false })
.on('propertychange.bfhselectbox.data-api change.bfhselectbox.data-api input.bfhselectbox.data-api paste.bfhselectbox.data-api', '.bfh-selectbox-filter', BFHSelectBox.prototype.filter)
})
}(window.jQuery);

View File

@@ -1,330 +0,0 @@
/*!
* Bootstrap Form Helpers
*
* Copyright 2012 Vincent Lamanna, Inc
* Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Designed and built by @vincent lamanna.
*/
.bfh-selectbox {
height: 30px;
position: relative;
display: inline-block;
}
.bfh-selectbox-toggle {
*margin-bottom: -3px;
}
.bfh-selectbox-toggle:active,
.open .bfh-selectbox-toggle {
outline: 0;
}
.bfh-selectbox .caret {
margin-top: 8px;
margin-left: 2px;
height: 8px;
}
.bfh-selectbox > .bfh-selectbox-toggle > .caret {
float: right;
}
.bfh-selectbox-options {
position: absolute;
top: 100%;
left: 0;
z-index: 1000;
display: none;
float: left;
min-width: 160px;
padding: 5px 0;
margin: 2px 0 0;
background-color: #ffffff;
border: 1px solid #ccc;
border: 1px solid rgba(0, 0, 0, 0.2);
*border-right-width: 2px;
*border-bottom-width: 2px;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
-webkit-background-clip: padding-box;
-moz-background-clip: padding;
background-clip: padding-box;
}
.bfh-selectbox-options ul {
list-style: none;
}
.bfh-selectbox-options.pull-right {
right: 0;
left: auto;
}
.bfh-selectbox-options a {
display: block;
padding: 3px 20px;
clear: both;
font-weight: normal;
line-height: 20px;
height: 20px;
color: #333333;
white-space: nowrap;
text-decoration: none;
}
.bfh-googlefonts .bfh-selectbox-options a {
height: 30px;
text-indent: -9999px;
background-image: url(../img/bootstrap-formhelpers-googlefonts.png);
}
.bfh-selectbox-options li > a:focus {
color: #ffffff;
text-decoration: none;
background-color: #0088cc;
background-color: #0081c2;
background-image: -moz-linear-gradient(top, #0088cc, #0077b3);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3));
background-image: -webkit-linear-gradient(top, #0088cc, #0077b3);
background-image: -o-linear-gradient(top, #0088cc, #0077b3);
background-image: linear-gradient(to bottom, #0088cc, #0077b3);
background-repeat: repeat-x;
filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);
}
.bfh-googlefonts .bfh-selectbox-options li > a:focus {
background-image: url(../img/bootstrap-formhelpers-googlefonts.png);
background-repeat: no-repeat;
filter: none;
background-color: transparent;
filter: none;
outline: none;
}
.bfh-selectbox-options .active > a,
.bfh-selectbox-options .active > a:hover {
color: #ffffff;
text-decoration: none;
background-color: #0088cc;
background-color: #0081c2;
background-image: linear-gradient(to bottom, #0088cc, #0077b3);
background-image: -moz-linear-gradient(top, #0088cc, #0077b3);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3));
background-image: -webkit-linear-gradient(top, #0088cc, #0077b3);
background-image: -o-linear-gradient(top, #0088cc, #0077b3);
background-repeat: repeat-x;
outline: 0;
filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);
}
.bfh-googlefonts .bfh-selectbox-options .active > a,
.bfh-googlefonts .bfh-selectbox-options .active > a:hover {
background-image: url(../img/bootstrap-formhelpers-googlefonts.png);
background-repeat: no-repeat;
filter: none;
background-color: transparent;
filter: none;
}
.bfh-selectbox-options .disabled > a,
.bfh-selectbox-options .disabled > a:hover {
color: #999999;
}
.open {
*z-index: 1000;
}
.open > .bfh-selectbox-options {
display: block;
}
.pull-right > .bfh-selectbox-options {
right: 0;
left: auto;
}
.bfh-selectbox > .bfh-selectbox-toggle {
color: #000;
padding: 4px;
display: inline-block;
text-decoration: none;
background-color: white;
border: 1px solid #CCC;
border: 1px solid rgba(0, 0, 0, 0.2);
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
}
.bfh-selectbox-options ul {
max-height: 200px;
overflow-x: hidden;
overflow-y: auto;
margin: 5px 0 0 0;
width: 240px;
}
.bfh-selectbox-filter {
margin: 0 10px;
}
.bfh-selectbox > .bfh-selectbox-toggle > .bfh-selectbox-option {
display: inline-block;
float: left;
height: 20px;
overflow: hidden;
}
span.bfh-countries {
line-height: 18px;
}
.bfh-datepicker-calendar > table.calendar {
width: 376px;
background: #fff;
}
.bfh-datepicker-calendar > table.calendar .months-header > th {
text-align: center;
font-size: 12px;
}
.bfh-datepicker-calendar > table.calendar .months-header > th.month > span {
width: 100px;
display: inline-block;
}
.bfh-datepicker-calendar > table.calendar .months-header > th.year > span {
width: 50px;
display: inline-block;
}
.bfh-datepicker-calendar > table.calendar .days-header > th {
text-align: center;
font-size: 11px;
line-height: 12px;
}
.bfh-datepicker-calendar > table.calendar > tbody > tr > td {
text-align: center;
font-size: 11px;
line-height: 12px;
}
.bfh-datepicker-calendar > table.calendar > tbody > tr > td.today {
background-color: #999;
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.bfh-datepicker-calendar > table.calendar > tbody > tr > td.off {
color: #aaa;
}
.bfh-datepicker {
position: relative;
}
.bfh-datepicker-toggle {
*margin-bottom: -3px;
}
.bfh-datepicker-calendar {
position: absolute;
top: 100%;
left: 0;
z-index: 1000;
display: none;
float: left;
min-width: 160px;
}
.bfh-datepicker-calendar.pull-right {
right: 0;
left: auto;
}
.open > .bfh-datepicker-calendar {
display: block;
}
.bfh-datepicker-calendar > table > tbody > tr > td:not(.off):hover {
cursor: pointer;
color: #ffffff;
text-decoration: none;
background-color: #0088cc;
background-color: #0081c2;
background-image: linear-gradient(to bottom, #0088cc, #0077b3);
background-image: -moz-linear-gradient(top, #0088cc, #0077b3);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3));
background-image: -webkit-linear-gradient(top, #0088cc, #0077b3);
background-image: -o-linear-gradient(top, #0088cc, #0077b3);
background-repeat: repeat-x;
outline: 0;
filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);
}
.bfh-timepicker-popover > table {
width: 180px;
margin: 0;
}
.bfh-timepicker-popover > table > tbody > tr > td {
text-align: center;
border: 0;
}
.bfh-timepicker-popover > table > tbody > tr > td.separator {
line-height: 65px;
font-weight: bold;
font-size: 20px;
}
.bfh-timepicker-popover > table > tbody > tr > td > input {
margin: 0;
text-align: center;
}
.bfh-timepicker {
position: relative;
}
.bfh-timepicker-toggle {
*margin-bottom: -3px;
}
.bfh-timepicker-popover {
position: absolute;
top: 100%;
left: 0;
z-index: 1000;
display: none;
float: left;
min-width: 160px;
background-color: #ffffff;
border: 1px solid #ccc;
border: 1px solid rgba(0, 0, 0, 0.2);
*border-right-width: 2px;
*border-bottom-width: 2px;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
}
.bfh-timepicker-popover.pull-right {
right: 0;
left: auto;
}
.open > .bfh-timepicker-popover {
display: block;
}

View File

@@ -552,9 +552,6 @@ class WSF_AUTOCOMPLETE_CONTROL extends WSF_INPUT_CONTROL
@$el.on 'typeahead:blured',()-> @$el.on 'typeahead:blured',()->
self.change() self.change()
class WSF_COUNTRY_CHOOSER_CONTROL extends WSF_INPUT_CONTROL
requirements: ['assets/bootstrap-formhelpers-countries.js', 'assets/bootstrap-formhelpers-countries-en-US.js', 'assets/bootstrap-formhelpers-selectbox.js', 'assets/bootstrap-formhelpers-countries.css', 'assets/bootstrap-formhelpers.css']
class WSF_DATETIME_PICKER_CONTROL extends WSF_INPUT_CONTROL class WSF_DATETIME_PICKER_CONTROL extends WSF_INPUT_CONTROL
requirements: ['assets/bootstrap-datetimepicker.css', 'assets/bootstrap-datetimepicker.js'] requirements: ['assets/bootstrap-datetimepicker.css', 'assets/bootstrap-datetimepicker.js']

View File

@@ -1,5 +1,5 @@
// Generated by CoffeeScript 1.6.1 // Generated by CoffeeScript 1.6.1
var Mini, WSF_AUTOCOMPLETE_CONTROL, WSF_BUTTON_CONTROL, WSF_CHECKBOX_CONTROL, WSF_CHECKBOX_LIST_CONTROL, WSF_CODEVIEW_CONTROL, WSF_CONTROL, WSF_COUNTRY_CHOOSER_CONTROL, WSF_DATETIME_PICKER_CONTROL, WSF_DROPDOWN_CONTROL, WSF_FILE_CONTROL, WSF_FORM_ELEMENT_CONTROL, WSF_GRID_CONTROL, WSF_HTML_CONTROL, WSF_INPUT_CONTROL, WSF_MAX_VALIDATOR, WSF_MIN_VALIDATOR, WSF_NAVLIST_ITEM_CONTROL, WSF_PAGE_CONTROL, WSF_PAGINATION_CONTROL, WSF_PASSWORD_CONTROL, WSF_PROGRESS_CONTROL, WSF_REGEXP_VALIDATOR, WSF_REPEATER_CONTROL, WSF_SLIDER_CONTROL, WSF_TEXTAREA_CONTROL, WSF_VALIDATOR, build_control, cache, controls, lazy_load, loaded, parseSuggestions, redirect, show_alert, start_modal, start_modal_big, template, tmpl, var Mini, WSF_AUTOCOMPLETE_CONTROL, WSF_BUTTON_CONTROL, WSF_CHECKBOX_CONTROL, WSF_CHECKBOX_LIST_CONTROL, WSF_CODEVIEW_CONTROL, WSF_CONTROL, WSF_DATETIME_PICKER_CONTROL, WSF_DROPDOWN_CONTROL, WSF_FILE_CONTROL, WSF_FORM_ELEMENT_CONTROL, WSF_GRID_CONTROL, WSF_HTML_CONTROL, WSF_INPUT_CONTROL, WSF_MAX_VALIDATOR, WSF_MIN_VALIDATOR, WSF_NAVLIST_ITEM_CONTROL, WSF_PAGE_CONTROL, WSF_PAGINATION_CONTROL, WSF_PASSWORD_CONTROL, WSF_PROGRESS_CONTROL, WSF_REGEXP_VALIDATOR, WSF_REPEATER_CONTROL, WSF_SLIDER_CONTROL, WSF_TEXTAREA_CONTROL, WSF_VALIDATOR, build_control, cache, controls, lazy_load, loaded, parseSuggestions, redirect, show_alert, start_modal, start_modal_big, template, tmpl,
__hasProp = {}.hasOwnProperty, __hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
@@ -883,20 +883,6 @@ WSF_AUTOCOMPLETE_CONTROL = (function(_super) {
})(WSF_INPUT_CONTROL); })(WSF_INPUT_CONTROL);
WSF_COUNTRY_CHOOSER_CONTROL = (function(_super) {
__extends(WSF_COUNTRY_CHOOSER_CONTROL, _super);
function WSF_COUNTRY_CHOOSER_CONTROL() {
return WSF_COUNTRY_CHOOSER_CONTROL.__super__.constructor.apply(this, arguments);
}
WSF_COUNTRY_CHOOSER_CONTROL.prototype.requirements = ['assets/bootstrap-formhelpers-countries.js', 'assets/bootstrap-formhelpers-countries-en-US.js', 'assets/bootstrap-formhelpers-selectbox.js', 'assets/bootstrap-formhelpers-countries.css', 'assets/bootstrap-formhelpers.css'];
return WSF_COUNTRY_CHOOSER_CONTROL;
})(WSF_INPUT_CONTROL);
WSF_DATETIME_PICKER_CONTROL = (function(_super) { WSF_DATETIME_PICKER_CONTROL = (function(_super) {
__extends(WSF_DATETIME_PICKER_CONTROL, _super); __extends(WSF_DATETIME_PICKER_CONTROL, _super);