clean up, change size of the tagsinput input

This commit is contained in:
Tyrel Souza 2014-04-22 15:42:39 -04:00
parent 67ed4565d4
commit 47e3e56a6c
4 changed files with 21 additions and 24 deletions

View File

@ -44,8 +44,8 @@ module ApplicationHelper
def us_states def us_states(options={})
[ states = [
['Alabama', 'AL'], ['Alabama', 'AL'],
['Alaska', 'AK'], ['Alaska', 'AK'],
['Arizona', 'AZ'], ['Arizona', 'AZ'],
@ -99,6 +99,11 @@ module ApplicationHelper
['Wisconsin', 'WI'], ['Wisconsin', 'WI'],
['Wyoming', 'WY'] ['Wyoming', 'WY']
] ]
if options.empty?
return states
else
convert_to_hash(states)[options[:item]]
end
end end

View File

@ -40,16 +40,14 @@
hint: "Used for script research." %> hint: "Used for script research." %>
<%= frm.input :productsandservices, <%= frm.input :productsandservices,
label: 'Products & Services', label: 'Products & Services',
hint: "Used in script and video research." %> hint: "Used in script and video research. List of items, Type product or service, then press enter to add another item.",
input_html: {data: {role: "tagsinput" }} %>
<%= frm.input :websiteurl, <%= frm.input :websiteurl,
label: 'Website URL', label: 'Website URL',
hint: "Used for script research and may be used in the video if they are including websites in the video graphics." %> hint: "Used for script research and may be used in the video if they are including websites in the video graphics." %>
<%= frm.input :vpa, <%= frm.input :vpa,
label: 'Client Service Rep', label: 'Client Service Rep',
hint: "This is the full name of the client services representative, as entered in the BetteVideo system associated with this order. This feature is designed for sales reps that are well known to the system. This feature is typically used for automated communication." %> hint: "This is the full name of the client services representative, as entered in the BetteVideo system associated with this order. This feature is designed for sales reps that are well known to the system. This feature is typically used for automated communication." %>
<%= frm.input :billingcode, <%= frm.input :billingcode,
label: 'Billing Code', label: 'Billing Code',
hint: "Market or billing code. Should match a billing code in the BetterVideo system so it can be associated." %> hint: "Market or billing code. Should match a billing code in the BetterVideo system so it can be associated." %>
@ -84,8 +82,9 @@
hint: "Used in script and video research." %> hint: "Used in script and video research." %>
<%= frm.input :companycolors, <%= frm.input :companycolors,
label: 'Company Colors', label: 'Company Colors',
hint: "Comma Separated.", hint: "List of items, Type color, then press enter to add another item.",
placeholder: "ex: red, white, blue" %> placeholder: "ex: red, white, blue",
input_html: {data: {role: "tagsinput" }} %>
<%= frm.input :facebookurl, <%= frm.input :facebookurl,
label: 'Facebook URL', label: 'Facebook URL',
@ -124,7 +123,8 @@
hint: "If the customer has provided a script for BetterVideo to use. Formatting is text only." %> hint: "If the customer has provided a script for BetterVideo to use. Formatting is text only." %>
<%= vidlist.input :keywords, <%= vidlist.input :keywords,
label: 'Keywords', label: 'Keywords',
hint: "Keywords for use in VSEO campaigns or indexing such as Google or YouTube." %> hint: "Keywords for use in VSEO campaigns or indexing such as Google or YouTube.",
input_html: {data: {role: "tagsinput" }} %>
<%= vidlist.input :focus, <%= vidlist.input :focus,
label: 'Focus', label: 'Focus',
hint: "Information used to guide BetterVideo in creating the video." %> hint: "Information used to guide BetterVideo in creating the video." %>
@ -134,7 +134,7 @@
<%= vidlist.input :asseturls, <%= vidlist.input :asseturls,
label: 'Asset Urls', label: 'Asset Urls',
placeholder: "ex: http://www.company.com/logo.png, http://www.company.com/background.png", placeholder: "ex: http://www.company.com/logo.png, http://www.company.com/background.png",
hint: "A list of all file assets.", hint: "A list of all file assets. List of items, Type asset url, then press enter to add another item.",
input_html: {data: {role: "tagsinput" }}%> input_html: {data: {role: "tagsinput" }}%>
</div> </div>
<% end %> <% end %>

View File

@ -63,16 +63,8 @@
<span><%= @campaign.address %></span> <span><%= @campaign.address %></span>
</span> </span>
<span class="campaign-item"> <span class="campaign-item">
<strong>City</strong> <strong>City, State, Zip</strong>
<span><%= @campaign.city %></span> <span><%= @campaign.city %>, <%= us_states item: @campaign.state %>, <%= @campaign.zip %></span>
</span>
<span class="campaign-item">
<strong>State</strong>
<span><%= @campaign.state %></span>
</span>
<span class="campaign-item">
<strong>Zip</strong>
<span><%= @campaign.zip %></span>
</span> </span>
<span class="campaign-item"> <span class="campaign-item">
<strong>Awards</strong> <strong>Awards</strong>

View File

@ -25,7 +25,7 @@
this.objectItems = options && options.itemValue; this.objectItems = options && options.itemValue;
this.$container = $('<div class="bootstrap-tagsinput"></div>'); this.$container = $('<div class="bootstrap-tagsinput"></div>');
this.$input = $('<input size="40" type="text" />').appendTo(this.$container); this.$input = $('<input size="100" type="text" />').appendTo(this.$container);
this.$element.after(this.$container); this.$element.after(this.$container);
@ -288,7 +288,7 @@
} }
$input.attr('size', Math.max(40, $input.val().length)); $input.attr('size', Math.max(100, $input.val().length));
}, self)); }, self));
// Remove icon clicked // Remove icon clicked