Commit 8b4fddc462b33515a3339ebbc848c2ca681f0082
Committed by
Antonio Terceiro
1 parent
df03fb0f
Exists in
master
and in
28 other branches
ActionItem1222: fixing javascript error
* the method addBehavior, that is defined on lowpro.js, was being called when lowpro was not loaded
Showing
2 changed files
with
11 additions
and
9 deletions
Show diff stats
app/views/cms/media_listing.rhtml
| ... | ... | @@ -46,6 +46,17 @@ |
| 46 | 46 | <% end %> |
| 47 | 47 | </div><!-- id='media-listing-upload' --> |
| 48 | 48 | <hr/> |
| 49 | + | |
| 50 | + <script type='text/javascript'> | |
| 51 | + document.observe("dom:loaded", function() { | |
| 52 | + Event.addBehavior.reassignAfterAjax = true; | |
| 53 | + Event.addBehavior({ | |
| 54 | + 'div#pagination-images .pagination a' : Remote.Link, | |
| 55 | + 'div#pagination-documents .pagination a' : Remote.Link | |
| 56 | + }) | |
| 57 | + }); | |
| 58 | + </script> | |
| 59 | + | |
| 49 | 60 | <div id='media-listing'> |
| 50 | 61 | <h3><%= _('Folders') %></h3> |
| 51 | 62 | <p><%= _('Drag images and documents to add them to the text. If needed, resize images by clicking the tree icon on editor.') %></p> | ... | ... |
public/javascripts/application.js
| ... | ... | @@ -45,12 +45,3 @@ function convToValidIdentifier( str, sep ) { |
| 45 | 45 | .replace( /ç/g, "c" ) |
| 46 | 46 | .replace( /[^-_a-z0-9]+/g, sep ) |
| 47 | 47 | } |
| 48 | - | |
| 49 | -document.observe("dom:loaded", function() { | |
| 50 | - Event.addBehavior.reassignAfterAjax = true; | |
| 51 | - Event.addBehavior({ | |
| 52 | - 'div#pagination-images .pagination a' : Remote.Link, | |
| 53 | - 'div#pagination-documents .pagination a' : Remote.Link | |
| 54 | - }) | |
| 55 | -}); | |
| 56 | - | ... | ... |