diff --git a/app/assets/stylesheets/campaign.css.scss b/app/assets/stylesheets/campaign.css.scss index 8c01257..03a4390 100644 --- a/app/assets/stylesheets/campaign.css.scss +++ b/app/assets/stylesheets/campaign.css.scss @@ -29,54 +29,54 @@ $medgray: #3A9AC9; } } -input { - width:100%; -} -input[type="submit"]{ - width: 131px -} - - -textarea { - width:100%; - height: 5em; -} - -select { - width:100%; -} - - -.campaign-item, .videolisting-item { - display:block; - strong { - display:block; +.campaigns { + input { + width: 100%; } - 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%; -} - diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 87a5dde..49536af 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -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 diff --git a/app/views/campaigns/_form.html.erb b/app/views/campaigns/_form.html.erb index 26c5c79..3b60592 100644 --- a/app/views/campaigns/_form.html.erb +++ b/app/views/campaigns/_form.html.erb @@ -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: ""} %> <% end %> diff --git a/app/views/campaigns/_videolisting.html.erb b/app/views/campaigns/_videolisting.html.erb index 38361c9..5b8d3d8 100644 --- a/app/views/campaigns/_videolisting.html.erb +++ b/app/views/campaigns/_videolisting.html.erb @@ -1,6 +1,6 @@
  • - videocode + Video Code <%= videolisting.videocode %> diff --git a/vendor/assets/javascripts/bootstrap-tagsinput.js b/vendor/assets/javascripts/bootstrap-tagsinput.js index b688242..5659f68 100755 --- a/vendor/assets/javascripts/bootstrap-tagsinput.js +++ b/vendor/assets/javascripts/bootstrap-tagsinput.js @@ -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('');