#3514079: Added theme negociator to allow contextual links to be rendered in...
4 open threads
4 open threads
Merge request reports
Activity
- Resolved by Lee Rowlands
- Resolved by Lee Rowlands
- Resolved by Lee Rowlands
- Resolved by nicoloye
added 1 commit
added 1 commit
added 2 commits
180 180 // Perform an AJAX request to let the server render the contextual links 181 181 // for each of the placeholders. 182 182 if (uncachedIDs.length > 0) { 183 const controllerUrl = `contextual/render?theme=${drupalSettings.contextual.theme}`; 183 184 $.ajax({ 184 url: Drupal.url('contextual/render'), 185 url: Drupal.url(controllerUrl), 185 186 type: 'POST', 186 187 data: { 'ids[]': uncachedIDs, 'tokens[]': uncachedTokens }, 187 188 dataType: 'json', 188 189 success(results) { 189 190 Object.entries(results).forEach(([contextualID, html]) => { 190 191 // Store the metadata. 191 192 storage.setItem(`Drupal.contextual.${contextualID}`, html); changed this line in version 12 of the diff
- Resolved by Adam Bramley
added 1 commit
- Resolved by Lee Rowlands
- Resolved by Adam Bramley
- Resolved by Adam Bramley
added 1 commit
- Resolved by Adam Bramley
- Resolved by Adam Bramley
- Resolved by Adam Bramley
180 180 // Perform an AJAX request to let the server render the contextual links 181 181 // for each of the placeholders. 182 182 if (uncachedIDs.length > 0) { 183 const controllerUrl = `contextual/render?theme=${drupalSettings.contextual.theme}`; 183 184 $.ajax({ 184 url: Drupal.url('contextual/render'), 185 url: Drupal.url(controllerUrl), 185 186 type: 'POST', 186 187 data: { 'ids[]': uncachedIDs, 'tokens[]': uncachedTokens }, 187 188 dataType: 'json', 188 189 success(results) { 189 190 Object.entries(results).forEach(([contextualID, html]) => { 190 191 // Store the metadata. 191 192 storage.setItem(`Drupal.contextual.${contextualID}`, html); changed this line in version 12 of the diff
added 1 commit
added 1 commit
128 133 $this->assertSame($links, _contextual_id_to_links($id)); 129 134 } 130 135 136 /** 137 * Tests the placeholder of contextual links in a specific theme. 138 * 139 * @param array $links 140 * The #contextual_links property value array. 141 * @param string $id 142 * The serialized representation of the passed links. 143 * @param string $theme 144 * The name of the theme the placeholder should pass to the controller. 145 * 146 * @covers \Drupal\contextual\Element\ContextualLinksPlaceholder::preRenderPlaceholder 128 133 $this->assertSame($links, _contextual_id_to_links($id)); 129 134 } 130 135 136 /** 137 * Tests the placeholder of contextual links in a specific theme. 138 * 139 * @param array $links 140 * The #contextual_links property value array. 141 * @param string $id 142 * The serialized representation of the passed links. 143 * @param string $theme 144 * The name of the theme the placeholder should pass to the controller. 145 * 146 * @covers \Drupal\contextual\Element\ContextualLinksPlaceholder::preRenderPlaceholder 147 * 148 * @dataProvider contextualLinksDataProvider
Please register or sign in to reply