diff --git a/app/views/learning_objects/_link_upload_form.html.erb b/app/views/learning_objects/_link_upload_form.html.erb index 59677cdeb23ef72eb87a421fe959bd90518a1c3a..5c0b6be00e3f2dfa72e5e2a8108112ab887d36b4 100644 --- a/app/views/learning_objects/_link_upload_form.html.erb +++ b/app/views/learning_objects/_link_upload_form.html.erb @@ -4,76 +4,4 @@ <%= text_field_tag "url" %> <br> <%= submit_tag "Salvar" %> -<% end %> -<style> - .danger, .danger:hover { - background-color: #e74c3c; - } - .inverse, .inverse:hover { - background-color: #34495e; - } - input[type="file"] { - height:32px; - } - div[data-nothingToUpload] { - display:none; - } - .deleteFile { - padding: 3px 7px; - color: #bf0000; - font-weight: bold; - cursor:pointer; - } - button { - border: none; - cursor: pointer; - background: #bdc3c7; - color: #ffffff; - padding: 9px 12px 10px; - line-height:1.333; - text-decoration: none; - text-shadow: none; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; - -webkit-transition: 0.25s; - -moz-transition: 0.25s; - -o-transition: 0.25s; - transition: 0.25s; - -webkit-backface-visibility: hidden; - } - .meter { - color:#fff; - line-height:18px; - font-size:12px; - } -</style> - -<script> - var results = $('#results'), - submitUrl = $('#submitButton'), - addButton = $("#addButton"), - nothingToUpload = $('[data-nothingToUpload]'); - - addButton.click(function(){ - var template = - "<div>" + - "<br><br>" + - "<input type='text' name='urls[]' id='urls'>" + - "<div class='right deleteFile'>X</div>" + - "</div>"; - - if (results.children().length == 0){ - results.append("<label id='label-secondary-urls' for='urls'>Links Secundários: </label>") - } - results.append(template); - }); - - $(document).on('click', '.deleteFile', function () { - $(this).parent().remove(); - if(results.children().length == 1){ - $('#label-secondary-urls').remove() - } - }); - -</script> \ No newline at end of file +<% end %> \ No newline at end of file