diff --git a/code/controllers/SilverStripeNavigator.php b/code/controllers/SilverStripeNavigator.php
index 1bb23de8..8066c2b1 100644
--- a/code/controllers/SilverStripeNavigator.php
+++ b/code/controllers/SilverStripeNavigator.php
@@ -122,9 +122,9 @@ class SilverStripeNavigatorItem extends ViewableData {
/**
* @return String
- * Text displayed in watermark
+ * Get the Title of an item
*/
- public function getWatermark() {}
+ public function getTitle() {}
/**
* Optional link to a specific view of this record.
@@ -190,6 +190,10 @@ class SilverStripeNavigatorItem_CMSLink extends SilverStripeNavigatorItem {
_t('ContentController.CMS', 'CMS')
);
}
+
+ public function getTitle() {
+ return _t('ContentController.CMS', 'CMS');
+ }
public function getLink() {
return $this->record->CMSEditLink();
@@ -221,7 +225,7 @@ class SilverStripeNavigatorItem_StageLink extends SilverStripeNavigatorItem {
}
}
- public function getWatermark() {
+ public function getTitle() {
return _t('ContentController.DRAFTSITE');
}
@@ -269,7 +273,7 @@ class SilverStripeNavigatorItem_LiveLink extends SilverStripeNavigatorItem {
}
}
- public function getWatermark() {
+ public function getTitle() {
return _t('ContentController.PUBLISHEDSITE');
}
@@ -310,6 +314,10 @@ class SilverStripeNavigatorItem_ArchiveLink extends SilverStripeNavigatorItem {
$this->recordLink = $this->record->AbsoluteLink();
return "recordLink?archiveDate={$this->record->LastEdited}\" target=\"_blank\">". _t('ContentController.ARCHIVEDSITE', 'Preview version') ."";
}
+
+ public function getTitle() {
+ return _t('ContentController.VERSION', 'Version').': '.$this->record->LastEdited;
+ }
public function getMessage() {
if($date = Versioned::current_archived_date()) {
diff --git a/javascript/SilverStripeNavigator.js b/javascript/SilverStripeNavigator.js
index f57a78b0..1e4d111d 100644
--- a/javascript/SilverStripeNavigator.js
+++ b/javascript/SilverStripeNavigator.js
@@ -4,32 +4,26 @@ function windowName(suffix) {
}
(function($) {
- $('#switchView a.newWindow').live('click',
- function() {
+ $(document).ready(function() {
+ $('#switchView a.newWindow').on('click', function(e) {
var w = window.open(this.href, windowName(this.target));
w.focus();
return false;
- }
- );
+ });
- $('#SilverStripeNavigatorLink').live('click',
- function() {
+ $('#SilverStripeNavigatorLink').on('click', function(e) {
$('#SilverStripeNavigatorLinkPopup').toggle();
return false;
- }
- );
-
- $('#SilverStripeNavigatorLinkPopup a.close').live('click',
- function() {
+ });
+
+ $('#SilverStripeNavigatorLinkPopup a.close').on('click', function(e) {
$('#SilverStripeNavigatorLinkPopup').hide();
return false;
- }
- );
-
- $('#SilverStripeNavigatorLinkPopup input').live('focus',
- function() {
+ });
+
+ $('#SilverStripeNavigatorLinkPopup input').on('focus',function(e) {
this.select();
- }
- );
+ });
+ });
})(jQuery);
diff --git a/templates/Includes/CMSMain_EditForm.ss b/templates/Includes/CMSMain_EditForm.ss
index 0d6d7c2f..0f50464f 100644
--- a/templates/Includes/CMSMain_EditForm.ss
+++ b/templates/Includes/CMSMain_EditForm.ss
@@ -22,11 +22,7 @@
<% loop Actions %>
$Field
<% end_loop %>
- <% if Controller.LinkPreview %>
-
- <% _t('LeftAndMain.PreviewButton', 'Preview') %> »
-
- <% end_if %>
+
<% end_if %>
diff --git a/templates/Includes/CMSSettingsController_EditForm.ss b/templates/Includes/CMSSettingsController_EditForm.ss
index dcbd4135..d233a3df 100644
--- a/templates/Includes/CMSSettingsController_EditForm.ss
+++ b/templates/Includes/CMSSettingsController_EditForm.ss
@@ -19,11 +19,6 @@
<% loop Actions %>
$Field
<% end_loop %>
- <% if Controller.LinkPreview %>
-
- <% _t('LeftAndMain.PreviewButton', 'Preview') %> »
-
- <% end_if %>
<% end_if %>