Changeset 20099 for extensions/UserCollections/admin
- Timestamp:
- Jan 13, 2013, 12:49:45 PM (12 years ago)
- Location:
- extensions/UserCollections/admin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/UserCollections/admin/export.php
r20090 r20099 12 12 } 13 13 14 // pwg_unset_session_var('uc_export_active_fields'); 15 // pwg_unset_session_var('uc_export_inactive_fields'); 14 16 15 17 if (isset($_POST['download'])) 16 18 { 17 $content = $UserCollection->serialize($_POST['content']); 19 pwg_set_session_var('uc_export_active_fields', $_POST['active']); 20 pwg_set_session_var('uc_export_inactive_fields', $_POST['inactive']); 21 22 $content = $UserCollection->serialize($_POST['active']); 18 23 $filename = 'collection_'.$_GET['col_id'].'_'.date('Ymd-Hi').'.csv'; 19 24 … … 32 37 } 33 38 39 $default_active_fields = array( 40 'id', 41 'name', 42 'path', 43 ); 44 $default_inactive_fields = array( 45 'file', 46 'url', 47 'date_creation', 48 'collection_add_date', 49 'filesize', 50 'width', 51 'height', 52 ); 53 54 $template->assign('active_fields', pwg_get_session_var('uc_export_active_fields', $default_active_fields)); 55 $template->assign('inactive_fields', pwg_get_session_var('uc_export_inactive_fields', $default_inactive_fields)); 56 34 57 $template->set_filename('user_collections', dirname(__FILE__) . '/template/export.tpl'); 35 58 -
extensions/UserCollections/admin/template/export.tpl
r20093 r20099 20 20 }); 21 21 22 $("#invokeFrame").load(function() { 23 $(this).css('height', $(this).contents().find('body').outerHeight(true)+10); 24 }); 25 22 26 $("input[name='download']").click(function() { 23 27 $("#fields_active li").each(function() { 24 $("#export_form").append('<input type="hidden" name="content[]" value="'+ $(this).data('name') +'"/>'); 28 $("#export_form").append('<input type="hidden" name="active[]" value="'+ $(this).data('name') +'"/>'); 29 }); 30 $("#fields_inactive li").each(function() { 31 $("#export_form").append('<input type="hidden" name="inactive[]" value="'+ $(this).data('name') +'"/>'); 25 32 }); 26 33 }); … … 37 44 <ul id="fields_active" class="connectedSortable"> 38 45 <h4>{'Active'|@translate}</h4> 39 <li data-name="id"><img src="{$themeconf.admin_icon_dir}/cat_move.png"> id</li>40 <li data-name=" name"><img src="{$themeconf.admin_icon_dir}/cat_move.png"> name</li>41 <li data-name="path"><img src="{$themeconf.admin_icon_dir}/cat_move.png"> path</li>46 {foreach from=$active_fields item=field} 47 <li data-name="{$field}"><img src="{$themeconf.admin_icon_dir}/cat_move.png"> {$field}</li> 48 {/foreach} 42 49 </ul> 43 50 <ul id="fields_inactive" class="connectedSortable"> 44 51 <h4>{'Inactive'|@translate}</h4> 45 <li data-name="file"><img src="{$themeconf.admin_icon_dir}/cat_move.png"> file</li> 46 <li data-name="url"><img src="{$themeconf.admin_icon_dir}/cat_move.png"> url</li> 52 {foreach from=$inactive_fields item=field} 53 <li data-name="{$field}"><img src="{$themeconf.admin_icon_dir}/cat_move.png"> {$field}</li> 54 {/foreach} 47 55 </ul> 48 56 -
extensions/UserCollections/admin/template/style.css
r20090 r20099 44 44 .connectedSortable { 45 45 display:inline-block; 46 width:1 50px;46 width:170px; 47 47 vertical-align:top; 48 48 border:1px dashed #7a7a7a; … … 96 96 #invokeFrame { 97 97 width:100%; 98 height:500px; 98 background:#e7e7e7; 99 color:#222; 100 border:none; 99 101 }
Note: See TracChangeset
for help on using the changeset viewer.