New folders block nav
++ search field : select on focus Signed-off-by: bachy <git@g-u-i.net>
This commit is contained in:
+18
-12
@@ -1,32 +1,39 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* materio_flag_refresh_block($flag)
|
||||
* materio_flag_refresh_blocks($flag)
|
||||
*
|
||||
*/
|
||||
function materio_flag_refresh_block($flag){
|
||||
$rep = array();
|
||||
|
||||
|
||||
switch ($flag) {
|
||||
case 'bookmarks':
|
||||
$block_name = 'materio_flag_mybookmarks';
|
||||
break;
|
||||
case 'lists':
|
||||
$block_name = 'materio_flag_mylists';
|
||||
$block_nav_name = 'materio_flag_mylists_nav';
|
||||
break;
|
||||
}
|
||||
|
||||
if(!isset($block_name))
|
||||
return;
|
||||
|
||||
// $block_content = module_invoke('block', 'block_view', 'materio_flag_mybookmarks');
|
||||
$rep = array();
|
||||
|
||||
$block = block_load('materio_flag', $block_name);
|
||||
$block_content = _block_render_blocks(array($block));
|
||||
$build = _block_get_renderable_array($block_content);
|
||||
$block_rendered = drupal_render($build);
|
||||
$rep['block'] = $block_rendered;
|
||||
|
||||
if(isset($block_nav_name))
|
||||
$block = block_load('materio_flag', $block_nav_name);
|
||||
$block_content = _block_render_blocks(array($block));
|
||||
$build = _block_get_renderable_array($block_content);
|
||||
$block_rendered = drupal_render($build);
|
||||
$rep['block_nav'] = $block_rendered;
|
||||
|
||||
$rep['block'] = $block_rendered;
|
||||
|
||||
drupal_json_output($rep);
|
||||
}
|
||||
@@ -93,18 +100,17 @@ function materio_flag_createlist_form($type){
|
||||
'#suffix' => '</div>',
|
||||
);
|
||||
|
||||
$form['actions']['create'] = array(
|
||||
'#type' => 'submit',
|
||||
'#value' => t('create'),
|
||||
'#name' => 'create',
|
||||
);
|
||||
|
||||
$form['actions']['cancel'] = array(
|
||||
'#type' => 'button',
|
||||
'#value' => t('cancel'),
|
||||
'#name' => 'cancel',
|
||||
);
|
||||
|
||||
$form['actions']['create'] = array(
|
||||
'#type' => 'submit',
|
||||
'#value' => t('create'),
|
||||
'#name' => 'create',
|
||||
);
|
||||
|
||||
|
||||
// dsm($form, 'form');
|
||||
@@ -130,7 +136,7 @@ function materio_flag_nodelinks(){
|
||||
if(count($nids)){
|
||||
foreach ($nids as $nid) {
|
||||
$node = node_load($nid);
|
||||
$lks = materio_flag_get_entity_links($node, 'node');
|
||||
$lks = render(materio_flag_get_entity_links($node, 'node'));
|
||||
$links[$nid] = $lks;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user