The media browser and media browser testbed both call drupal_add_js() to add settings to the page. These settings could be #attached to the forms for improved alterability/cacheability.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Devin Carlson’s picture

Status: Active » Needs review
FileSize
1.92 KB
ParisLiakos’s picture

+++ b/includes/media.browser.inc
@@ -26,8 +26,18 @@ function media_browser($selected = NULL) {
+          array(
+            'selectedMedia' => array_values($files)
+          ),

this could be written as one liner, but in any case, if you keep it like that add a comma after array_values

Otherwise patch looks good. havent tested manually though

SocialNicheGuru’s picture

there are errors when I attempt to apply to newest media dev version

Devin Carlson’s picture

Issue summary: View changes
FileSize
7.53 KB

Media: WYSIWYG should also #attach its assets.

Devin Carlson’s picture

Tested #4 and committed to Media 7.x-2.x. Leaving open for the remaining instances found in #1.

  • Devin Carlson committed 1e1aade on 7.x-2.x
    Issue #2121253 by Devin Carlson: Attached Media: WYSIWYG assets.
    
SocialNicheGuru’s picture

media_browser_js has been removed from media.
Edit: this is taken care of as of April 24, 2015 release

  • Devin Carlson committed 1e1aade on 7.x-3.x
    Issue #2121253 by Devin Carlson: Attached Media: WYSIWYG assets.
    
joseph.olstad’s picture

Status: Needs review » Fixed

fixed a while back

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.