From 0a2675d8b698302e50cb64ce5793ab9d22dee329 Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Wed, 28 Mar 2012 10:49:34 +0200 Subject: filer: replace "file as" prompt with combobox opened in fancybox --- mod/filer.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'mod') diff --git a/mod/filer.php b/mod/filer.php index a9e213536..82537848b 100755 --- a/mod/filer.php +++ b/mod/filer.php @@ -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(); } -- cgit v1.2.3