2011 February, 24 (Guerric)

    Table of contents
    No headers
    // Paste PHP Code
    
    Index: deki/plugins/files_table/files_table.js
    ===================================================================
    --- deki/plugins/files_table/files_table.js	(revision 25509)
    +++ deki/plugins/files_table/files_table.js	(working copy)
    @@ -221,6 +221,12 @@
     				doPopupMoveAttach(Deki.PageId, fileId);
     				return false;
     			});
    +			
    +			$menu.find('.description').click(function() {
    +				toggleMenu($menu);
    +				$menu.parents('tr:first').find('.deki-editable').click();
    +				return false;
    +			});
     	
     			$menu.find('.delete').click(function() {
     				toggleMenu($menu);
    Index: deki/plugins/files_table/files_table.php
    ===================================================================
    --- deki/plugins/files_table/files_table.php	(revision 25509)
    +++ deki/plugins/files_table/files_table.php	(working copy)
    @@ -401,22 +401,30 @@
      		if (!$File->isRevision())
      		{
      			$menuItems = array();
    + 			
      			// new version
      			$href = self::getAttachVersionHref($File->getId());
      			$menuItems[] = array(
      				'class' => 'new quickpopup',
      				'text' => '<a href="'. $href .'" title="'.wfMsg('Article.Attach.attachnew.title').'">'. Skin::iconify('attachedit') .'<span class="label">'. wfMsg('Article.Attach.menu.attachnew') .'</span></a>'
      			);
    + 			// edit description
    +  			$menuItems[] = array(
    + 				'class' => 'description',
    + 				'text' => '<a href="#">'. Skin::iconify('attachdescription') .'<span class="label">'. wfMsg('Article.Attach.menu.description') .'</span></a>'
    + 			);
    + 			
       			// move file
      			$menuItems[] = array(
      				'class' => 'move',
      				'text' => '<a href="#">'. Skin::iconify('attachmove') .'<span class="label">'. wfMsg('Article.Attach.menu.move') .'</span></a>'
      			);
    -  			// delete file
    +  			
    + 			// delete file
      			$menuItems[] = array(
      				'class' => 'delete',
      				'text' => '<a href="#">'. Skin::iconify('attachdel') .'<span class="label">'. wfMsg('Article.Attach.menu.delete') .'</span></a>'
    - 			); 			
    + 			);
     
      			/**
      			 * @params DekiFile $File
    Index: resources/resources.txt
    ===================================================================
    --- resources/resources.txt	(revision 25509)
    +++ resources/resources.txt	(working copy)
    @@ -757,6 +757,7 @@
     	table-header-file=File
     	table-header-size=Size
     	menu.attachnew=Attach new version
    +	menu.description=Edit description
     	menu.move=Move/rename
     	menu.delete=Delete
     	info.moved=File moved from "$1" to "$2"
    Tag page
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by