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'],
['Alaska', 'AK'],
['Arizona', 'AZ'],
@ -99,6 +99,11 @@ module ApplicationHelper
['Wisconsin', 'WI'],
['Wyoming', 'WY']
]
if options.empty?
return states
else
convert_to_hash(states)[options[:item]]
end
end

View File

@ -40,16 +40,14 @@
hint: "Used for script research." %>
<%= frm.input :productsandservices,
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,
label: 'Website URL',
hint: "Used for script research and may be used in the video if they are including websites in the video graphics." %>
<%= frm.input :vpa,
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." %>
<%= frm.input :billingcode,
label: 'Billing Code',
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." %>
<%= frm.input :companycolors,
label: 'Company Colors',
hint: "Comma Separated.",
placeholder: "ex: red, white, blue" %>
hint: "List of items, Type color, then press enter to add another item.",
placeholder: "ex: red, white, blue",
input_html: {data: {role: "tagsinput" }} %>
<%= frm.input :facebookurl,
label: 'Facebook URL',
@ -124,7 +123,8 @@
hint: "If the customer has provided a script for BetterVideo to use. Formatting is text only." %>
<%= vidlist.input :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,
label: 'Focus',
hint: "Information used to guide BetterVideo in creating the video." %>
@ -134,7 +134,7 @@
<%= vidlist.input :asseturls,
label: 'Asset Urls',
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" }}%>
</div>
<% end %>

View File

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

View File

@ -25,7 +25,7 @@
this.objectItems = options && options.itemValue;
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);
@ -288,7 +288,7 @@
}
$input.attr('size', Math.max(40, $input.val().length));
$input.attr('size', Math.max(100, $input.val().length));
}, self));
// Remove icon clicked