Quantcast
Channel: SharePoint 2013 - General Discussions and Questions forum
Viewing all articles
Browse latest Browse all 26374

Collapse Tasks in Gantt-View / Datasheet-View

$
0
0

Hi there,

i found this code to collapse tasks in views:

<script src="//code.jquery.com/jquery-1.10.2.js"></script><script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script><script type="text/javascript">
 jQuery(document).ready(function($) {
 (function($){
     function doCollapseTaskList() {
$(".ms-commentcollapse-iconouter > img").each(function(){
$(this).click();
});
}
$(function() {
  SP.SOD.executeOrDelayUntilScriptLoaded(function () {
if (typeof asyncDeltaManager != "undefined")
             asyncDeltaManager.add_endRequest(doCollapseTaskList);
           else doCollapseTaskList();
   },'SP.js');
     });

     })(jQuery);
   });
 </script>

This works fine. But if I'm in the Datasheet-View or Ganttview (here ist the datsheet-view plus graphs) it doesn't work.

Now I wonder how this is possible to get work. Or it isn't possible?

Thank you for your help :)



Viewing all articles
Browse latest Browse all 26374

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>