Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Small bug fixes #13

Merged
merged 2 commits into from

2 participants

@jamesbolitho

Hi Aram,

A couple of small bug fixes that work for me.

Thanks,

Jim

jamesbolitho added some commits
@jamesbolitho jamesbolitho The page view button links were not working too well when editing the…
… dataobject i.e. Draft and Published buttons. For example clicking on Draft button was just showing the published page. This modification seems to resolve the problem.
3e3f795
@jamesbolitho jamesbolitho This takes the end of the href after the underscore on the Left Pane,…
… Tab Strip in Model admin. Just in case the label text in the link is not the same as the managed DataObject.
1298510
@arambalakjian arambalakjian merged commit e49b500 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 7, 2012
  1. @jamesbolitho

    The page view button links were not working too well when editing the…

    jamesbolitho authored
    … dataobject i.e. Draft and Published buttons. For example clicking on Draft button was just showing the published page. This modification seems to resolve the problem.
  2. @jamesbolitho

    This takes the end of the href after the underscore on the Left Pane,…

    jamesbolitho authored
    … Tab Strip in Model admin. Just in case the label text in the link is not the same as the managed DataObject.
This page is out of date. Refresh to see the latest.
View
4 code/DataObjects/DataObjectAsPage.php
@@ -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())
{
View
4 javascript/jquery.dataobjectaspageadmin.js
@@ -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;
Something went wrong with that request. Please try again.