Move view selector to the left

By Alexander

I got a request from “tecrms” that sounded like this:

As you know on all list views and document views, the view selector is on the right hand side of the menu bar. This can make it quite cumbersome for users looking at lists with many columns to change the view. A better option would be for the view selector to be on the left hand side and right hand side of the menu bar. I know I can move the view selector via SPD but would rather use a JavaScript options if one was available. Would this be something you would be interested in creating?

It’s often harder to think out the question than to actually solve the issue…

This is the default placement of the view-selector:
IMG

Here the selector is inserted after the “Settings-menu”:
IMG


Here is how it’s done
Add a CEWP below the list view, and add this code (alter the location of the jQuery-scipt as needed)

<script type="text/javascript" src="../../Javascript/jquery-1.3.2.min.js"></script>
<script type="text/javascript">
$("td.ms-toolbar:last").insertBefore($("td.ms-toolbar[width='99%']"));
</script>

Thanks to “tecrms” for the clever question.

Regards
Alexander

5 Responses to “Move view selector to the left”

  1. tecrms Says:

    Alexander…your rock! Thanks!

  2. Charlie Epes Says:

    Hi:
    Can this be done with the “Site Actions” button too?

    Charlie Epes

  3. Alexander Says:

    Hi Charlie,
    Yes it can: Move site actions to the left.

    Alexander

  4. larry Says:

    IS there a way to copy, instead of move the view selector? have it on both sides?

    • Alexander Says:

      I tried to just “clone” the selector, but then the menu is opened in the same selector regardless of which menu you click. I reckon this has to do with the id of the selector not being unique anymore…

      It may be possible if you alter the id of the menu, and the function which opens it.

      Alexander

Leave a Reply