Change keydown to add comma in the js library.

This commit is contained in:
Tyrel Souza 2014-04-22 16:49:09 -04:00
parent 732e3d80a0
commit 74c1c12062
5 changed files with 58 additions and 78 deletions

View File

@ -29,43 +29,43 @@ $medgray: #3A9AC9;
}
}
input {
width:100%;
}
input[type="submit"]{
.campaigns {
input {
width: 100%;
}
input[type="submit"] {
width: 131px
}
}
textarea {
width:100%;
textarea {
width: 100%;
height: 5em;
}
}
select {
width:100%;
}
select {
width: 100%;
}
.campaign-item, .videolisting-item {
display:block;
.campaign-item, .videolisting-item {
display: block;
strong {
display:block;
display: block;
}
span {
padding-left: 2em;
}
span.list-item {
display:block;
}
}
span.tag.label.label-info {
display: block;
margin-bottom:1px;
}
}
span.tag.label.label-info {
display: block;
margin-bottom: 1px;
.tag-item {
width:90%;
width: 90%;
white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
@ -74,9 +74,9 @@ span.tag.label.label-info {
word-break: break-all;
white-space: normal;
}
}
}
div.bootstrap-tagsinput {
width:100%;
div.bootstrap-tagsinput {
width: 100%;
}
}

View File

@ -6,12 +6,8 @@ module ApplicationHelper
producttypeids << ["722 - Basic Video Shoot", 722]
producttypeids << ["723 - Repurposed", 723]
producttypeids << ["724 - Repurposed Edit", 724]
return options.empty? ? producttypeids : convert_to_hash(producttypeids)[options[:item]]
if options.empty?
return producttypeids
else
convert_to_hash(producttypeids)[options[:item]]
end
end
def voiceoverselection_list(options={})
@ -19,11 +15,7 @@ module ApplicationHelper
voiceoverselections << ["1 - Male", 1]
voiceoverselections << ["2 - Female", 2]
voiceoverselections << ["3 - No Preference", 3]
if options.empty?
return voiceoverselections
else
convert_to_hash(voiceoverselections)[options[:item]]
end
return options.empty? ? voiceoverselections : convert_to_hash(voiceoverselections)[options[:item]]
end
def musicselection_list(options={})
@ -35,11 +27,7 @@ module ApplicationHelper
musicselections << ["4 - New Age", 4]
musicselections << ["5 - Positive", 5]
musicselections << ["6 - Rock", 6]
if options.empty?
return musicselections
else
convert_to_hash(musicselections)[options[:item]]
end
return options.empty? ? musicselections : convert_to_hash(musicselections)[options[:item]]
end
@ -99,11 +87,7 @@ module ApplicationHelper
['Wisconsin', 'WI'],
['Wyoming', 'WY']
]
if options.empty?
return states
else
convert_to_hash(states)[options[:item]]
end
return options.empty? ? states : convert_to_hash(states)[options[:item]]
end

View File

@ -40,8 +40,7 @@
hint: "Used for script research." %>
<%= frm.input :productsandservices,
label: 'Products & Services',
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" }} %>
hint: "Used in script and video research. List of items, Type product or service, then press enter to add another item." %>
<%= 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." %>
@ -82,9 +81,8 @@
hint: "Used in script and video research." %>
<%= frm.input :companycolors,
label: 'Company Colors',
hint: "List of items, Type color, then press enter to add another item.",
placeholder: "ex: red, white, blue",
input_html: {data: {role: "tagsinput" }} %>
hint: "Comma separated.",
placeholder: "ex: red, white, blue" %>
<%= frm.input :facebookurl,
label: 'Facebook URL',
@ -123,8 +121,7 @@
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.",
input_html: {data: {role: "tagsinput" }} %>
hint: "Keywords for use in VSEO campaigns or indexing such as Google or YouTube." %>
<%= vidlist.input :focus,
label: 'Focus',
hint: "Information used to guide BetterVideo in creating the video." %>
@ -133,8 +130,7 @@
hint: "Notes and/or instructions sent in this field are used by the editors to aid in production of the video." %>
<%= 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. List of items, Type asset url, then press enter to add another item.",
hint: "A list of all file assets. Comma Separated, (press backspace or click the x to remove)",
input_html: {data: {role: "tagsinput" }, value: ""} %>
</div>
<% end %>

View File

@ -1,6 +1,6 @@
<li>
<span class="videolisting-item">
<strong>videocode</strong>
<strong>Video Code</strong>
<span><%= videolisting.videocode %></span>
</span>
<span class="videolisting-item">

View File

@ -277,8 +277,8 @@
$input.focus();
}
break;
// ENTER
case 13:
case 188: // COMMA
case 13: // ENTER
if (self.options.freeInput) {
self.add($input.val());
$input.val('');