whowish_word 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +6 -0
- data/.loadpath +5 -0
- data/.project +17 -0
- data/Gemfile +3 -0
- data/HOW_TO_BUILD_WHOWISH_HOOK.md +10 -0
- data/ISSUE.md +93 -0
- data/README.md +72 -0
- data/config.ru +4 -0
- data/lib/legacy/whowish_word/config.rb +1 -0
- data/lib/legacy/whowish_word/init.rb +4 -0
- data/lib/legacy/whowish_word/lib/app/controllers/whowish_word_controller.rb +115 -0
- data/lib/legacy/whowish_word/lib/app/controllers/whowish_word_email_controller.rb +66 -0
- data/lib/legacy/whowish_word/lib/app/controllers/whowish_word_facebook_controller.rb +62 -0
- data/lib/legacy/whowish_word/lib/app/models/mongodb/whowish_word.rb +12 -0
- data/lib/legacy/whowish_word/lib/app/models/mongodb/whowish_word_email.rb +10 -0
- data/lib/legacy/whowish_word/lib/app/models/mongodb/whowish_word_facebook.rb +28 -0
- data/lib/legacy/whowish_word/lib/app/models/mysql/whowish_word.rb +5 -0
- data/lib/legacy/whowish_word/lib/app/models/mysql/whowish_word_email.rb +5 -0
- data/lib/legacy/whowish_word/lib/app/models/mysql/whowish_word_facebook.rb +18 -0
- data/lib/legacy/whowish_word/lib/app/views/layouts/whowish_word_blank.html.erb +94 -0
- data/lib/legacy/whowish_word/lib/app/views/whowish_word/_javascript.html.erb +82 -0
- data/lib/legacy/whowish_word/lib/app/views/whowish_word/_row.html.erb +50 -0
- data/lib/legacy/whowish_word/lib/app/views/whowish_word/index.html.erb +219 -0
- data/lib/legacy/whowish_word/lib/app/views/whowish_word/login.html.erb +5 -0
- data/lib/legacy/whowish_word/lib/app/views/whowish_word_email/_row.html.erb +42 -0
- data/lib/legacy/whowish_word/lib/app/views/whowish_word_email/index.html.erb +99 -0
- data/lib/legacy/whowish_word/lib/app/views/whowish_word_facebook/_row.html.erb +48 -0
- data/lib/legacy/whowish_word/lib/app/views/whowish_word_facebook/index.html.erb +100 -0
- data/lib/legacy/whowish_word/lib/db_migration.rb +2 -0
- data/lib/legacy/whowish_word/lib/db_migration/mongodb.rb +0 -0
- data/lib/legacy/whowish_word/lib/db_migration/mysql.rb +60 -0
- data/lib/legacy/whowish_word/lib/hook.rb +186 -0
- data/lib/whowish_word.rb +1 -0
- data/lib/whowish_word/action_controller/base.rb +35 -0
- data/lib/whowish_word/action_mailer/base.rb +12 -0
- data/lib/whowish_word/action_view/base.rb +65 -0
- data/lib/whowish_word/action_view/template.rb +22 -0
- data/lib/whowish_word/authentication.rb +14 -0
- data/lib/whowish_word/constant.rb +9 -0
- data/lib/whowish_word/db_migration/active_record/whowish_word_html.rb +15 -0
- data/lib/whowish_word/initializer.rb +55 -0
- data/lib/whowish_word/rails/app/controllers/whowish_word_controller.rb +71 -0
- data/lib/whowish_word/rails/app/models/active_record/whowish_word_html.rb +4 -0
- data/lib/whowish_word/rails/app/models/mongoid/whowish_word_html.rb +10 -0
- data/lib/whowish_word/rails/public/javascripts/0_class.js +64 -0
- data/lib/whowish_word/rails/public/javascripts/0_jquery-1.6.4-whowish_word.js +9046 -0
- data/lib/whowish_word/rails/public/javascripts/1_csrf_and_authenticity_token_hook.js +9 -0
- data/lib/whowish_word/rails/public/javascripts/1_jquery.escape.js +23 -0
- data/lib/whowish_word/rails/public/javascripts/1_jquery.loading_button.js +66 -0
- data/lib/whowish_word/rails/public/javascripts/1_jquery.sizes.min.js +8 -0
- data/lib/whowish_word/rails/public/javascripts/2_whowish_word_variables.js +64 -0
- data/lib/whowish_word/rails/public/javascripts/3_whowish_word_dialog.js +136 -0
- data/lib/whowish_word/rails/public/javascripts/3_whowish_word_helper.js +94 -0
- data/lib/whowish_word/rails/public/javascripts/4_whowish_word.js +43 -0
- data/lib/whowish_word/rails/public/javascripts/4_whowish_word_content_handler.js +15 -0
- data/lib/whowish_word/rails/public/javascripts/4_whowish_word_creator.js +62 -0
- data/lib/whowish_word/rails/public/javascripts/5_whowish_word_common_creator.js +49 -0
- data/lib/whowish_word/rails/public/javascripts/6_whowish_word_element_creator.js +72 -0
- data/lib/whowish_word/rails/public/javascripts/6_whowish_word_html_creator.js +19 -0
- data/lib/whowish_word/rails/public/javascripts/6_whowish_word_select_creator.js +11 -0
- data/lib/whowish_word/rails/public/javascripts/6_whowish_word_text_creator.js +20 -0
- data/lib/whowish_word/rails/public/javascripts/6_whowish_word_value_creator.js +20 -0
- data/lib/whowish_word/rails/public/javascripts/7_whowish_word_attribute_handler.js +17 -0
- data/lib/whowish_word/rails/public/javascripts/7_whowish_word_html_handler.js +15 -0
- data/lib/whowish_word/rails/public/javascripts/7_whowish_word_text_handler.js +15 -0
- data/lib/whowish_word/rails/public/javascripts/7_whowish_word_value_handler.js +19 -0
- data/lib/whowish_word/rails/public/stylesheets/whowish_word.css +197 -0
- data/lib/whowish_word/whowish_word.rb +39 -0
- data/lib/whowish_word/word_for.rb +97 -0
- data/rails/Gemfile +18 -0
- data/rails/Gemfile.lock +130 -0
- data/rails/Rakefile +7 -0
- data/rails/app/assets/javascripts/integration.js +2 -0
- data/rails/app/assets/javascripts/test_javascript.js +2 -0
- data/rails/app/assets/javascripts/test_word_for.js +2 -0
- data/rails/app/assets/stylesheets/integration.css +4 -0
- data/rails/app/assets/stylesheets/test_javascript.css +4 -0
- data/rails/app/assets/stylesheets/test_word_for.css +4 -0
- data/rails/app/controllers/application_controller.rb +14 -0
- data/rails/app/controllers/home_controller.rb +9 -0
- data/rails/app/controllers/integration_controller.rb +5 -0
- data/rails/app/controllers/test_javascript_controller.rb +11 -0
- data/rails/app/controllers/test_word_for_controller.rb +5 -0
- data/rails/app/helpers/integration_helper.rb +2 -0
- data/rails/app/helpers/test_javascript_helper.rb +2 -0
- data/rails/app/helpers/test_word_for_helper.rb +2 -0
- data/rails/app/views/home/index.html.erb +95 -0
- data/rails/app/views/home/static_edit.html.erb +50 -0
- data/rails/app/views/home/static_edit_select.html.erb +9 -0
- data/rails/app/views/integration/attr.html.erb +1 -0
- data/rails/app/views/integration/index.html.erb +1 -0
- data/rails/app/views/integration/select.html.erb +3 -0
- data/rails/app/views/integration/value.html.erb +1 -0
- data/rails/app/views/layouts/integration.html.erb +14 -0
- data/rails/app/views/layouts/main.html.erb +14 -0
- data/rails/app/views/layouts/nested_test_word_for.html.erb +14 -0
- data/rails/app/views/layouts/test_javascript.html.erb +13 -0
- data/rails/app/views/layouts/test_word_for.html.erb +22 -0
- data/rails/app/views/test_javascript/change_value.html.erb +32 -0
- data/rails/app/views/test_javascript/index.html.erb +78 -0
- data/rails/app/views/test_word_for/_partial.html.erb +5 -0
- data/rails/app/views/test_word_for/index.html.erb +7 -0
- data/rails/config.ru +4 -0
- data/rails/config/application.rb +30 -0
- data/rails/config/boot.rb +9 -0
- data/rails/config/database.yml +25 -0
- data/rails/config/environment.rb +16 -0
- data/rails/config/initializers/whowish_word.rb +5 -0
- data/rails/config/mongoid.rb +6 -0
- data/rails/config/mongoid.yml +14 -0
- data/rails/config/routes.rb +7 -0
- data/rails/log/.gitignore +2 -0
- data/rails/mongo.bat +5 -0
- data/rails/public/jasmine/MIT.LICENSE +20 -0
- data/rails/public/jasmine/jasmine-html.js +190 -0
- data/rails/public/jasmine/jasmine.css +166 -0
- data/rails/public/jasmine/jasmine.js +2476 -0
- data/rails/public/jasmine/jasmine_favicon.png +0 -0
- data/rails/public/javascripts/jquery-1.6.4.js +9046 -0
- data/rails/public/sinonjs/sinonjs.js +2821 -0
- data/rails/public/stylesheets/main.css +22 -0
- data/rails/public/test/jquery_version.html +26 -0
- data/rails/script/rails +6 -0
- data/rails/spec/controllers/whowish_word_controller_spec.rb +56 -0
- data/rails/spec/integration/whowish_word_generator_spec.rb +116 -0
- data/rails/spec/integration/whowish_word_spec.rb +110 -0
- data/rails/spec/spec_helper.rb +44 -0
- data/rails/spec/support/browser.rb +194 -0
- data/rails/spec/support/json_rspec_helper.rb +9 -0
- data/rails/spec/support/mongoid_helper.rb +10 -0
- data/spec/spec_helper.rb +19 -0
- data/spec/unit/word_for_attr_in_edit_mode_spec.rb +44 -0
- data/spec/unit/word_for_attr_spec.rb +44 -0
- data/spec/unit/word_for_in_edit_mode_spec.rb +44 -0
- data/spec/unit/word_for_spec.rb +44 -0
- data/whowish_word.gemspec +21 -0
- metadata +181 -0
@@ -0,0 +1,39 @@
|
|
1
|
+
require File.expand_path("../constant", __FILE__)
|
2
|
+
require File.expand_path("../initializer", __FILE__)
|
3
|
+
require File.expand_path("../word_for", __FILE__)
|
4
|
+
require File.expand_path("../authentication", __FILE__)
|
5
|
+
|
6
|
+
module WhowishWord
|
7
|
+
include WhowishWord::Constant
|
8
|
+
include WhowishWord::Initializer
|
9
|
+
include WhowishWord::WordFor
|
10
|
+
include WhowishWord::Authentication
|
11
|
+
|
12
|
+
attr_accessor :words
|
13
|
+
|
14
|
+
def init(orm_engine = :active_record)
|
15
|
+
|
16
|
+
@orm_engine = orm_engine
|
17
|
+
|
18
|
+
init_username_and_password
|
19
|
+
run_database_migration
|
20
|
+
install_route
|
21
|
+
install_hook
|
22
|
+
load_rails
|
23
|
+
|
24
|
+
words = WhowishWordHtml.all()
|
25
|
+
|
26
|
+
@words = {}
|
27
|
+
words.each { |word|
|
28
|
+
@words[word.word_id] = word.content
|
29
|
+
}
|
30
|
+
|
31
|
+
end
|
32
|
+
|
33
|
+
def add_or_set_word(word_id, content)
|
34
|
+
@words[word_id] = content
|
35
|
+
end
|
36
|
+
|
37
|
+
extend self
|
38
|
+
end
|
39
|
+
|
@@ -0,0 +1,97 @@
|
|
1
|
+
require File.expand_path("../constant", __FILE__)
|
2
|
+
|
3
|
+
module WhowishWord
|
4
|
+
|
5
|
+
module WordFor
|
6
|
+
include WhowishWord::Constant
|
7
|
+
|
8
|
+
def word_for(namespace, id, *variables)
|
9
|
+
return word_for_normal_mode(namespace, id, *variables)
|
10
|
+
end
|
11
|
+
|
12
|
+
def word_for_attr(namespace, id, *variables)
|
13
|
+
return word_for_normal_mode(namespace, id, *variables)
|
14
|
+
end
|
15
|
+
|
16
|
+
def word_for_in_edit_mode(namespace, id, *variables)
|
17
|
+
return "<dfn>#{word_for_edit_mode(namespace, id, *variables)}</dfn>".html_safe
|
18
|
+
end
|
19
|
+
|
20
|
+
def word_for_attr_in_edit_mode(namespace, id, *variables)
|
21
|
+
return word_for_edit_mode(namespace, id, *variables)
|
22
|
+
end
|
23
|
+
|
24
|
+
|
25
|
+
def word_for_edit_mode(namespace, id, *variables)
|
26
|
+
|
27
|
+
variables = sanitize_variables_arg(variables)
|
28
|
+
|
29
|
+
locale = "en"
|
30
|
+
|
31
|
+
variable_suffix = ""
|
32
|
+
if variables.length > 0
|
33
|
+
|
34
|
+
var_keys = []
|
35
|
+
variables.map { |key,val| var_keys.push("#{key}") }
|
36
|
+
|
37
|
+
variable_suffix = "|#{var_keys.join(",")}"
|
38
|
+
|
39
|
+
end
|
40
|
+
|
41
|
+
return PREFIX + \
|
42
|
+
SEPARATOR + \
|
43
|
+
get_whowish_word_id(namespace, id, locale) + \
|
44
|
+
variable_suffix + \
|
45
|
+
SEPARATOR + \
|
46
|
+
word_for_normal_mode(namespace, id, variables)
|
47
|
+
|
48
|
+
end
|
49
|
+
|
50
|
+
def sanitize_variables_arg(variables)
|
51
|
+
|
52
|
+
if variables.length > 0
|
53
|
+
variables = variables[0]
|
54
|
+
else
|
55
|
+
variables = {}
|
56
|
+
end
|
57
|
+
|
58
|
+
return variables
|
59
|
+
|
60
|
+
end
|
61
|
+
|
62
|
+
def word_for_normal_mode(namespace, id, *variables)
|
63
|
+
|
64
|
+
variables = sanitize_variables_arg(variables)
|
65
|
+
|
66
|
+
locale = "en"
|
67
|
+
word_id = get_whowish_word_id(namespace, id, locale)
|
68
|
+
|
69
|
+
if @words[word_id]
|
70
|
+
|
71
|
+
content = "#{@words[word_id]}"
|
72
|
+
variables.each_pair { |key,val| content.gsub!("{#{key}}","#{val}") }
|
73
|
+
|
74
|
+
else
|
75
|
+
|
76
|
+
content = word_id
|
77
|
+
|
78
|
+
if variables.length > 0
|
79
|
+
content_params = []
|
80
|
+
variables.each_pair { |key,val| content_params.push("#{key}") }
|
81
|
+
content += "{#{content_params.join(',')}}"
|
82
|
+
end
|
83
|
+
|
84
|
+
end
|
85
|
+
|
86
|
+
return content.html_safe
|
87
|
+
|
88
|
+
end
|
89
|
+
|
90
|
+
private
|
91
|
+
def get_whowish_word_id(namespace, id, locale)
|
92
|
+
"#{namespace}:#{id}(#{locale})".downcase
|
93
|
+
end
|
94
|
+
|
95
|
+
end
|
96
|
+
|
97
|
+
end
|
data/rails/Gemfile
ADDED
data/rails/Gemfile.lock
ADDED
@@ -0,0 +1,130 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
actionmailer (3.1.0)
|
5
|
+
actionpack (= 3.1.0)
|
6
|
+
mail (~> 2.3.0)
|
7
|
+
actionpack (3.1.0)
|
8
|
+
activemodel (= 3.1.0)
|
9
|
+
activesupport (= 3.1.0)
|
10
|
+
builder (~> 3.0.0)
|
11
|
+
erubis (~> 2.7.0)
|
12
|
+
i18n (~> 0.6)
|
13
|
+
rack (~> 1.3.2)
|
14
|
+
rack-cache (~> 1.0.3)
|
15
|
+
rack-mount (~> 0.8.2)
|
16
|
+
rack-test (~> 0.6.1)
|
17
|
+
sprockets (~> 2.0.0)
|
18
|
+
activemodel (3.1.0)
|
19
|
+
activesupport (= 3.1.0)
|
20
|
+
bcrypt-ruby (~> 3.0.0)
|
21
|
+
builder (~> 3.0.0)
|
22
|
+
i18n (~> 0.6)
|
23
|
+
activerecord (3.1.0)
|
24
|
+
activemodel (= 3.1.0)
|
25
|
+
activesupport (= 3.1.0)
|
26
|
+
arel (~> 2.2.1)
|
27
|
+
tzinfo (~> 0.3.29)
|
28
|
+
activeresource (3.1.0)
|
29
|
+
activemodel (= 3.1.0)
|
30
|
+
activesupport (= 3.1.0)
|
31
|
+
activesupport (3.1.0)
|
32
|
+
multi_json (~> 1.0)
|
33
|
+
arel (2.2.1)
|
34
|
+
bcrypt-ruby (3.0.1-x86-mingw32)
|
35
|
+
bson (1.4.0)
|
36
|
+
bson_ext (1.4.0)
|
37
|
+
builder (3.0.0)
|
38
|
+
childprocess (0.2.2)
|
39
|
+
ffi (~> 1.0.6)
|
40
|
+
diff-lcs (1.1.3)
|
41
|
+
erubis (2.7.0)
|
42
|
+
ffi (1.0.9-x86-mingw32)
|
43
|
+
hike (1.2.1)
|
44
|
+
i18n (0.6.0)
|
45
|
+
json_pure (1.6.1)
|
46
|
+
mail (2.3.0)
|
47
|
+
i18n (>= 0.4.0)
|
48
|
+
mime-types (~> 1.16)
|
49
|
+
treetop (~> 1.4.8)
|
50
|
+
mime-types (1.16)
|
51
|
+
mongo (1.4.0)
|
52
|
+
bson (= 1.4.0)
|
53
|
+
mongoid (2.2.0)
|
54
|
+
activemodel (~> 3.0)
|
55
|
+
mongo (~> 1.3)
|
56
|
+
tzinfo (~> 0.3.22)
|
57
|
+
multi_json (1.0.3)
|
58
|
+
polyglot (0.3.2)
|
59
|
+
rack (1.3.3)
|
60
|
+
rack-cache (1.0.3)
|
61
|
+
rack (>= 0.4)
|
62
|
+
rack-mount (0.8.3)
|
63
|
+
rack (>= 1.0.0)
|
64
|
+
rack-ssl (1.3.2)
|
65
|
+
rack
|
66
|
+
rack-test (0.6.1)
|
67
|
+
rack (>= 1.0)
|
68
|
+
rails (3.1.0)
|
69
|
+
actionmailer (= 3.1.0)
|
70
|
+
actionpack (= 3.1.0)
|
71
|
+
activerecord (= 3.1.0)
|
72
|
+
activeresource (= 3.1.0)
|
73
|
+
activesupport (= 3.1.0)
|
74
|
+
bundler (~> 1.0)
|
75
|
+
railties (= 3.1.0)
|
76
|
+
railties (3.1.0)
|
77
|
+
actionpack (= 3.1.0)
|
78
|
+
activesupport (= 3.1.0)
|
79
|
+
rack-ssl (~> 1.3.2)
|
80
|
+
rake (>= 0.8.7)
|
81
|
+
rdoc (~> 3.4)
|
82
|
+
thor (~> 0.14.6)
|
83
|
+
rake (0.8.7)
|
84
|
+
rdoc (3.9.4)
|
85
|
+
rspec (2.6.0)
|
86
|
+
rspec-core (~> 2.6.0)
|
87
|
+
rspec-expectations (~> 2.6.0)
|
88
|
+
rspec-mocks (~> 2.6.0)
|
89
|
+
rspec-core (2.6.4)
|
90
|
+
rspec-expectations (2.6.0)
|
91
|
+
diff-lcs (~> 1.1.2)
|
92
|
+
rspec-mocks (2.6.0)
|
93
|
+
rspec-rails (2.6.1)
|
94
|
+
actionpack (~> 3.0)
|
95
|
+
activesupport (~> 3.0)
|
96
|
+
railties (~> 3.0)
|
97
|
+
rspec (~> 2.6.0)
|
98
|
+
rubyzip (0.9.4)
|
99
|
+
selenium-webdriver (2.6.0)
|
100
|
+
childprocess (>= 0.2.1)
|
101
|
+
ffi (>= 1.0.7)
|
102
|
+
json_pure
|
103
|
+
rubyzip
|
104
|
+
sprockets (2.0.0)
|
105
|
+
hike (~> 1.2)
|
106
|
+
rack (~> 1.0)
|
107
|
+
tilt (~> 1.1, != 1.3.0)
|
108
|
+
sqlite3 (1.3.4-x86-mingw32)
|
109
|
+
thor (0.14.6)
|
110
|
+
tilt (1.3.3)
|
111
|
+
treetop (1.4.10)
|
112
|
+
polyglot
|
113
|
+
polyglot (>= 0.3.1)
|
114
|
+
tzinfo (0.3.29)
|
115
|
+
watir-webdriver (0.3.3)
|
116
|
+
selenium-webdriver (>= 0.2.2)
|
117
|
+
watir-webdriver-rails (0.0.6)
|
118
|
+
watir-webdriver
|
119
|
+
|
120
|
+
PLATFORMS
|
121
|
+
x86-mingw32
|
122
|
+
|
123
|
+
DEPENDENCIES
|
124
|
+
bson_ext
|
125
|
+
mongoid
|
126
|
+
rails
|
127
|
+
rake (= 0.8.7)
|
128
|
+
rspec-rails
|
129
|
+
sqlite3
|
130
|
+
watir-webdriver-rails
|
data/rails/Rakefile
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
2
|
+
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
3
|
+
|
4
|
+
require File.expand_path('../config/application', __FILE__)
|
5
|
+
require 'rake'
|
6
|
+
|
7
|
+
WhowishWordRails::Application.load_tasks
|
@@ -0,0 +1,95 @@
|
|
1
|
+
<form autocomplete="off" onsubmit="return false;">
|
2
|
+
<div>
|
3
|
+
<span style="width:600px;">
|
4
|
+
<p>This is the page that tests every element.</p>
|
5
|
+
</span>
|
6
|
+
<span>
|
7
|
+
<%
|
8
|
+
if @whowish_word_edit_mode == true
|
9
|
+
%>
|
10
|
+
<a href="/home">Dectivate edit mode</a>
|
11
|
+
<%
|
12
|
+
else
|
13
|
+
%>
|
14
|
+
<a href="/home?edit_mode=yes">Activate edit mode</a>
|
15
|
+
<%
|
16
|
+
end
|
17
|
+
%>
|
18
|
+
</span>
|
19
|
+
<span>
|
20
|
+
<b>Text: </b> <%=word_for :text%>
|
21
|
+
</span>
|
22
|
+
<span>
|
23
|
+
<b>Label: </b> <label for="some_textbox"><%=word_for_attr :label_text%></label>
|
24
|
+
<input type="text" name="some_textbox">
|
25
|
+
</span>
|
26
|
+
<span>
|
27
|
+
<b>Textbox: </b> <input type="textbox"
|
28
|
+
title="<%=word_for_attr :textbox_title%>"
|
29
|
+
value="<%=word_for_attr :textbox_value%>"
|
30
|
+
placeholder="<%=word_for_attr :textbox_placeholder%>">
|
31
|
+
</span>
|
32
|
+
<span>
|
33
|
+
<b>Textarea: </b> <textarea
|
34
|
+
title="<%=word_for_attr :textarea_title%>"
|
35
|
+
placeholder="<%=word_for_attr :textarea_placeholder%>"><%=word_for_attr :textarea_value%></textarea>
|
36
|
+
</span>
|
37
|
+
<span>
|
38
|
+
<b>Checkbox: </b> <input type="checkbox"
|
39
|
+
title="<%=word_for_attr :checkbox_title%>"
|
40
|
+
value="<%=word_for_attr :checkbox_value%>">
|
41
|
+
</span>
|
42
|
+
<span>
|
43
|
+
<b>Radio: </b> <input type="radio"
|
44
|
+
title="<%=word_for_attr :radio_title%>"
|
45
|
+
value="<%=word_for_attr :radio_value%>">
|
46
|
+
</span>
|
47
|
+
<span>
|
48
|
+
<b>Select: </b> <select title="<%=word_for_attr :select_title%>">
|
49
|
+
<option value="<%=word_for_attr :option_value_0%>"><%=word_for_attr :option_text_0%></option>
|
50
|
+
<option value="<%=word_for_attr :option_value_1%>"><%=word_for_attr :option_text_1%></option>
|
51
|
+
</select>
|
52
|
+
</span>
|
53
|
+
<span>
|
54
|
+
<b>Button(Input): </b> <input type="button"
|
55
|
+
title="<%=word_for_attr :input_button_title%>"
|
56
|
+
value="<%=word_for_attr :input_button_value%>" >
|
57
|
+
</span>
|
58
|
+
<span>
|
59
|
+
<b>Submit(Input): </b> <input type="submit"
|
60
|
+
title="<%=word_for_attr :submit_title%>"
|
61
|
+
value="<%=word_for_attr :submit_value%>" >
|
62
|
+
</span>
|
63
|
+
<span>
|
64
|
+
<b>Button: </b> <button title="<%=word_for_attr :button_title%>"><%=word_for_attr :button_value%></button>
|
65
|
+
</span>
|
66
|
+
<span>
|
67
|
+
<b>Late Text: </b> <span id="late_text"></span>
|
68
|
+
|
69
|
+
<script type="text/javascript">
|
70
|
+
|
71
|
+
setTimeout(function() {
|
72
|
+
$('#late_text').html("<%=word_for :late_text%>");
|
73
|
+
},5000);
|
74
|
+
|
75
|
+
</script>
|
76
|
+
</span>
|
77
|
+
<span>
|
78
|
+
<b>Late Textbox: </b> <input type="textbox" id="late_textbox"
|
79
|
+
title="title"
|
80
|
+
value="value"
|
81
|
+
placeholder="placeholder">
|
82
|
+
|
83
|
+
<script type="text/javascript">
|
84
|
+
|
85
|
+
setTimeout(function() {
|
86
|
+
$('#late_textbox').attr("title","<%=word_for_attr :late_textbox_title%>");
|
87
|
+
$('#late_textbox').val("<%=word_for_attr :late_textbox_value%>");
|
88
|
+
$('#late_textbox').attr("placeholder","<%=word_for_attr :late_textbox_placeholder%>");
|
89
|
+
},5000);
|
90
|
+
|
91
|
+
</script>
|
92
|
+
</span>
|
93
|
+
</div>
|
94
|
+
</form>
|
95
|
+
|