Commit 743b2a60b332f74cfa55c92b341fa49dfe619870
1 parent
4dab3b15
Exists in
master
and in
28 other branches
Move "loading" icon from the button to the box
Showing
3 changed files
with
5 additions
and
4 deletions
Show diff stats
app/views/cms/_text_editor_sidebar.rhtml
... | ... | @@ -25,7 +25,7 @@ |
25 | 25 | <p><%= link_to(_('Upload more files ...'), '#', :id => 'media-upload-more-files')%></p> |
26 | 26 | </div> |
27 | 27 | </div> |
28 | - <div class='text-editor-sidebar-box'> | |
28 | + <div id='media-search-box' class='text-editor-sidebar-box'> | |
29 | 29 | <p><strong>Media search</strong></p> |
30 | 30 | <p> |
31 | 31 | <% form_tag({ :action => 'search' }) do %> | ... | ... |
public/javascripts/article.js
... | ... | @@ -41,13 +41,13 @@ jQuery(function($) { |
41 | 41 | $('#media-search-button').click(function() { |
42 | 42 | var query = '*' + $('#media-search-query').val() + '*'; |
43 | 43 | var $button = $(this); |
44 | - $button.toggleClass('icon-loading'); | |
44 | + $('#media-search-box').toggleClass('icon-loading'); | |
45 | 45 | $.get($(this).parent().attr('action'), { 'q': query }, function(data) { |
46 | 46 | insert_items(data, '#media-search-results ul'); |
47 | 47 | if (data.length && data.length > 0) { |
48 | 48 | $('#media-search-results').slideDown(); |
49 | 49 | } |
50 | - $button.toggleClass('icon-loading'); | |
50 | + $('#media-search-box').toggleClass('icon-loading'); | |
51 | 51 | }); |
52 | 52 | return false; |
53 | 53 | }); | ... | ... |
public/stylesheets/application.css
... | ... | @@ -3397,7 +3397,8 @@ div.with_media_panel .formfield input { |
3397 | 3397 | background-color: transparent; |
3398 | 3398 | border: none; |
3399 | 3399 | } |
3400 | -.text-editor-sidebar #media-upload-box { | |
3400 | +.text-editor-sidebar #media-upload-box, | |
3401 | +.text-editor-sidebar #media-search-box { | |
3401 | 3402 | background-repeat: no-repeat; |
3402 | 3403 | background-position: top right ; |
3403 | 3404 | } | ... | ... |