Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
custom_block.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
25 Feb 2014 at 22:13 UTC
Updated:
29 Jul 2014 at 23:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
rteijeiro commentedLet's do it!
Comment #2
rteijeiro commentedNot sure if it's good but here is the patch :)
Comment #3
sunOh, we should actually wait until the parent issue has landed — I should have created this issue as postponed, sorry! :-/
Once that is in, your patch will probably work - we will just need to change the #attached syntax.
Comment #4
sun#2203407: Replace #attached library array values with provider-namespaced strings has landed, so this needs a re-roll now.
Comment #5
jibranReroll
Comment #6
larowlanCode looks good.
Manually tested and JS does what it is supposed to.
RTBC
Screenshot from manual testing https://www.dropbox.com/s/mit4nwd7dyyou1i/Screenshot%202014-03-11%2016.5...
Comment #7
sunFor all libraries of modules in core, the value of version should be
VERSIONIt looks like the JS was only conditionally loaded previously?
#access causes the entire element to not be rendered, so #attached libraries are not loaded if #access is FALSE.
We're missing the declaration of dependencies for the library. AFAICS, the dependencies are:
- core/drupal.form
- core/drupal
- core/jquery
Comment #8
jibranFixed #7 and moved the JS file into JS folder.
Comment #9
sunThanks!
Comment #11
jibran8: 2205155-create-custom-block-library-8.patch queued for re-testing.
Comment #12
jibranReverting the old status.
Comment #13
wim leersI'd have expected the JS (and therefore also the library) to contain the string "admin", because it's not end-user facing, only admin-facing. I could see that being considered out of scope though, so I won't un-RTBC. At the same time, it'd be easy and fine to do that here.
Comment #14
wim leersComment #15
alexpottCommitted f45195e and pushed to 8.x. Thanks!