Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

SharePoint 2013 Gantt View Default Zoom

$
0
0

Hi guys!

I need a help. I tried to change the default zoom of a gantt view to show months instead of days with two scripts:

First attempt:

<script src="http://code.jquery.com/jquery-1.11.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function () {
        var count = 0;
        setInterval(function () {
            if (count < 2) {
                for (var i = 0; i < 2; i++) {
                    if (WebPartWPQ2_JSGridController != null) {
                        WebPartWPQ2_JSGridController.ZoomOutGantt();
                        count++;
                    }
                }
            }
        }, 100);
    });
</script>

Second attempt:

<script src="indicate jquery.js location here" type="text/javascript">
$(function(){
  setTimeout(function(){
    for (var i = 0; i < 3; ++i) WebPartWPQ2_JSGridController.ZoomOutGantt()
  }, 2000)
})
</script>

I added a Content Editor Web Part and past a script in the Source Editor (HTML Source), but nothing has changed.

There anything else that I have to do?

Thanks!


Viewing all articles
Browse latest Browse all 7589

Trending Articles



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