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,54 +29,54 @@ $medgray: #3A9AC9;
} }
} }
input {
width:100%;
}
input[type="submit"]{ .campaigns {
width: 131px input {
} width: 100%;
textarea {
width:100%;
height: 5em;
}
select {
width:100%;
}
.campaign-item, .videolisting-item {
display:block;
strong {
display:block;
} }
span {
padding-left: 2em; input[type="submit"] {
width: 131px
} }
span.list-item {
display:block; textarea {
width: 100%;
height: 5em;
}
select {
width: 100%;
}
.campaign-item, .videolisting-item {
display: block;
strong {
display: block;
}
span {
padding-left: 2em;
}
span.list-item {
display: block;
}
}
span.tag.label.label-info {
display: block;
margin-bottom: 1px;
.tag-item {
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 */
white-space: pre-wrap; /* css-3 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
word-break: break-all;
white-space: normal;
}
}
div.bootstrap-tagsinput {
width: 100%;
} }
} }
span.tag.label.label-info {
display: block;
margin-bottom:1px;
.tag-item {
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 */
white-space: pre-wrap; /* css-3 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
word-break: break-all;
white-space: normal;
}
}
div.bootstrap-tagsinput {
width:100%;
}

View File

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

View File

@ -40,8 +40,7 @@
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. List of items, Type product or service, then press enter to add another item.", 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." %>
@ -82,9 +81,8 @@
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: "List of items, Type color, then press enter to add another item.", hint: "Comma separated.",
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',
@ -123,8 +121,7 @@
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." %>
@ -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." %> hint: "Notes and/or instructions sent in this field are used by the editors to aid in production of the video." %>
<%= 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", hint: "A list of all file assets. Comma Separated, (press backspace or click the x to remove)",
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" }, value: ""} %> input_html: {data: {role: "tagsinput" }, value: ""} %>
</div> </div>
<% end %> <% end %>

View File

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

View File

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