filer: replace "file as" prompt with combobox opened in fancybox

This commit is contained in:
Fabio Comuni
2012-03-28 10:49:34 +02:00
parent 7aec2fd68d
commit 0a2675d8b6
6 changed files with 145 additions and 29 deletions

View File

@@ -16,8 +16,20 @@ function filer_content(&$a) {
logger('filer: tag ' . $term . ' item ' . $item_id);
if($item_id && strlen($term))
if($item_id && strlen($term)){
// file item
file_tag_save_file(local_user(),$item_id,$term);
} else {
// return filer dialog
$filetags = get_pconfig(local_user(),'system','filetags');
$filetags = explode("][", trim($filetags,"[]"));
$tpl = get_markup_template("filer_dialog.tpl");
$o = replace_macros($tpl, array(
'$field' => array('term', t("File as:"), '', '', $filetags, t('- select -')),
'$submit' => t('Save'),
));
echo $o;
}
killme();
}