function viewWorkspace(path, collectionName, menu) {

  var currentPath = '';
  if (path) {
    currentPath = path;
  }

  localStorage.removeItem("pageurl");
  localStorage.setItem("pageurl", currentPath);

  if (menu === 'browse') {
    $('.nav--workspace li').removeClass('selected');
    $("#browse").addClass('selected');
    loadBrowseScreen();
  }
  else if (menu === 'create') {
    $('.nav--workspace li').removeClass('selected');
    $("#create").addClass('selected');
    loadCreateScreen(collectionName);
  }
  else if (menu === 'edit') {
    $('.nav--workspace li').removeClass('selected');
    $("#edit").addClass('selected');
    loadPageDataIntoEditor(path, collectionName);
  }
  else if (menu === 'review') {
    $('.nav--workspace li').removeClass('selected');
    $("#review").addClass('selected');
    loadReviewScreen(collectionName);
    checkForPageChanged(updateReviewScreen(collectionName));
  }

  //click handlers
  $('.nav--workspace > li').click(function () {
    menu = '';
    $('.nav--workspace li').removeClass('selected');
    $(this).addClass('selected');

    if (Florence.Editor.isDirty) {
      var result = confirm("You have unsaved changes. Are you sure you want to continue");
      if (result === true) {
        Florence.Editor.isDirty = false;
      } else {
        return false;
      }
    }

    if ($(this).is('#browse')) {
      loadBrowseScreen('click');
    }
    else if ($(this).is('#create')) {
      loadCreateScreen(collectionName);
    }
    else if ($(this).is('#edit')) {
      loadPageDataIntoEditor(getPathName(document.getElementById('iframe').contentWindow.location.href), Florence.collection.id);
    }
    else if ($(this).is('#review')) {
      loadReviewScreen(collectionName);
      checkForPageChanged(updateReviewScreen(collectionName));
    }
    else {
      loadBrowseScreen();
    }
  });
}


@@ -1002,96 +1002,8 @@
 '';%0A
-    $('.nav--workspace li').removeClass('selected');%0A    $(this).addClass('selected');%0A%0A
     
@@ -1190,24 +1190,56 @@
 ty = false;%0A
+        processMenuClick(this);%0A
       %7D else
@@ -1280,25 +1280,237 @@
    %7D
-%0A%0A    if ($(this)
+ else %7B%0A      processMenuClick(this);%0A    %7D%0A%0A  %7D);%0A%0A  function processMenuClick(clicked) %7B%0A%0A    var menuItem = $(clicked);%0A%0A    $('.nav--workspace li').removeClass('selected');%0A    menuItem.addClass('selected');%0A%0A    if (menuItem
 .is(
@@ -1553,36 +1553,32 @@
 ('click');%0A    %7D
-%0A   
  else if ($(this
@@ -1567,31 +1567,32 @@
  %7D else if (
-$(this)
+menuItem
 .is('#create
@@ -1634,36 +1634,32 @@
 tionName);%0A    %7D
-%0A   
  else if ($(this
@@ -1648,31 +1648,32 @@
  %7D else if (
-$(this)
+menuItem
 .is('#edit')
@@ -1807,28 +1807,24 @@
 n.id);%0A    %7D
-%0A   
  else if ($(
@@ -1825,15 +1825,16 @@
 if (
-$(this)
+menuItem
 .is(
@@ -1955,20 +1955,16 @@
 );%0A    %7D
-%0A   
  else %7B%0A
@@ -1998,14 +1998,12 @@
    %7D%0A  %7D
-);
 %0A%7D%0A%0A

Fix dirty checking when clicking workspace menu.