Permalink
Browse files

Merge pull request #13 from jim2mullered/master

Great thanks Jim!
  • Loading branch information...
2 parents 5ea05be + 1298510 commit e49b5000309eaab58f6ebbed2c09b39578dceb55 Aram Balakjian committed Jun 12, 2012
Showing with 4 additions and 4 deletions.
  1. +2 −2 code/DataObjects/DataObjectAsPage.php
  2. +2 −2 javascript/jquery.dataobjectaspageadmin.js
@@ -145,13 +145,13 @@ public function getCMSFields()
if($this->ID)
{
$color = '#E88F31';
- $links = '<a target="_blank" href="' . $this->Link('?stage=Stage') . '">Draft</a>';
+ $links = '<a target="_blank" href="' . $this->Link() . '?stage=Stage">Draft</a>';
$status = $this->Status;
if($this->Status == 'Published')
{
$color = '#000';
- $links .= ' | <a target="_blank" href="' . $this->Link('?stage=Live') . '">Published</a>';
+ $links .= ' | <a target="_blank" href="' . $this->Link() . '?stage=Live">Published</a>';
if($this->hasChangesOnStage())
{
@@ -1,8 +1,8 @@
(function($) {
$(document).ready(function() {
var doList = function() {
- var currentModel = $('#ModelClassSelector').children('select');
- var currentModelName = $('#SearchForm_holder .tabstrip a').text();
+ var currentModel = $('#SearchForm_holder .tabstrip a').attr('href');
+ var currentModelName = currentModel.substr(currentModel.indexOf("_") + 1);
var strFormname = "#Form_SearchForm_" + currentModelName;
$(strFormname).submit();
return false;

0 comments on commit e49b500

Please sign in to comment.