Compare commits

...

16 Commits

Author SHA1 Message Date
Maxime Rainville 71d7345a3b
Merge pull request #157 from creative-commoners/pulls/master/abandoned
Mark as abandoned
2023-03-17 10:29:18 +13:00
Guy Sartorelli 446bb12a88
Mark as abandoned 2023-03-17 10:26:53 +13:00
Guy Marriott 619d3e9dd7
Merge branch '2' 2019-08-01 14:23:29 +12:00
Guy Marriott de147fb1a2
Merge branch '2.0' into 2 2019-08-01 14:23:12 +12:00
Guy Marriott 5e8b45f200
Update Travis config 2019-08-01 14:22:53 +12:00
Mateusz Uzdowski 8d1523346e
jQuery 3 compatibility. 2019-08-01 14:22:53 +12:00
Guy Marriott fc7c658b00
jQuery 3 compatibility. (#153)
jQuery 3 compatibility.

Co-authored-by: Guy Marriott <guy@scopey.co.nz>
2019-08-01 14:03:16 +12:00
Guy Marriott a5f7e6f22d
Update Travis config 2019-08-01 14:01:07 +12:00
Mateusz Uzdowski f259e97e13 jQuery 3 compatibility. 2019-08-01 13:55:00 +12:00
Robbie Averill eba2d4536c Update branch alias for master to 3.x-dev 2019-04-29 16:57:06 +12:00
Robbie Averill 5f7a4f7e23 Merge branch '2' 2019-04-29 16:56:49 +12:00
Robbie Averill a539c38091 Remove obsolete branch alias 2019-04-29 16:56:22 +12:00
Robbie Averill 57857836e9 Merge branch '2.0' 2019-02-14 17:43:43 +07:00
Robbie Averill 6dd75a2884 Remove obsolete branch alias 2019-02-14 17:43:28 +07:00
Guy Marriott 171652b338
Merge pull request #151 from creative-commoners/pulls/2.0/extensible-edit-link
FIX getEditLink is now extensible and Lang route handling has a fallback
2019-02-14 20:56:02 +13:00
Robbie Averill e0c20ddf2b FIX getEditLink is now extensible and Lang route handling has a fallback
In some cases the Lang is not available in the route, this fixes that as well as
making the getEditLink() method extensible
2019-02-01 12:19:52 +03:00
5 changed files with 35 additions and 19 deletions

View File

@ -1,24 +1,26 @@
# See https://github.com/silverstripe-labs/silverstripe-travis-support for setup details
# See https://github.com/silverstripe/silverstripe-travis-support for setup details
sudo: false
dist: trusty
language: php
php:
- 5.4
- 5.5
- 5.6
- 7.1
env:
- DB=MYSQL CORE_RELEASE=3
- DB=MYSQL CORE_RELEASE=3.7
matrix:
include:
- php: '7.1'
env: DB=MYSQL CORE_RELEASE=3.7
- php: '7.2'
env: DB=MYSQL CORE_RELEASE=3.7
- php: '7.3'
env: DB=MYSQL CORE_RELEASE=3.7
before_script:
- composer self-update || true
- git clone git://github.com/silverstripe-labs/silverstripe-travis-support.git ~/travis-support
- git clone git://github.com/silverstripe/silverstripe-travis-support.git ~/travis-support
- php ~/travis-support/travis_setup.php --source `pwd` --target ~/builds/ss
- cd ~/builds/ss
- composer install
script:
- vendor/bin/phpunit docsviewer/tests

View File

@ -1,5 +1,9 @@
# Documentation Viewer Module
## ABANDONED
This package is abandoned. See [silverstripe/doc.silverstripe.org](https://github.com/silverstripe/doc.silverstripe.org) instead.
[![Build Status](https://secure.travis-ci.org/silverstripe/silverstripe-docsviewer.png?branch=master)](http://travis-ci.org/silverstripe/silverstripe-docsviewer)
## Maintainer Contact

View File

@ -213,7 +213,6 @@ class DocumentationViewer extends Controller implements PermissionProvider
ltrim($url, '/'),
strlen($base)
);
} else {
}
//
@ -276,6 +275,11 @@ class DocumentationViewer extends Controller implements PermissionProvider
// return $redirect->redirect($cleaned, 302);
// }
if ($record = $this->getManifest()->getPage($url)) {
// In SS 3 offsetSet() isn't implemented for some reason... this is a workaround
$routeParams = $this->request->routeParams();
$routeParams['Lang'] = $lang;
$this->request->setRouteParams($routeParams);
$this->record = $record;
$this->init();
@ -687,10 +691,13 @@ class DocumentationViewer extends Controller implements PermissionProvider
/**
* Returns an edit link to the current page (optional).
*
* @return string
* @return string|false
*/
public function getEditLink()
{
$editLink = false;
$entity = null;
$page = $this->getPage();
if ($page) {
@ -706,13 +713,13 @@ class DocumentationViewer extends Controller implements PermissionProvider
}
if ($version == 'trunk' && (isset($url['options']['rewritetrunktomaster']))) {
if ($version === 'trunk' && (isset($url['options']['rewritetrunktomaster']))) {
if ($url['options']['rewritetrunktomaster']) {
$version = "master";
}
}
return str_replace(
$editLink = str_replace(
array('%entity%', '%lang%', '%version%', '%path%'),
array(
$entity->title,
@ -725,7 +732,9 @@ class DocumentationViewer extends Controller implements PermissionProvider
}
}
return false;
$this->extend('updateDocumentationEditLink', $editLink, $entity);
return $editLink;
}

View File

@ -24,7 +24,8 @@
},
"extra": {
"branch-alias": {
"dev-master": "2.x-dev"
"dev-master": "3.x-dev"
}
}
},
"abandoned": true
}

View File

@ -55,7 +55,7 @@
}
};
$(window).load(updateTables);
$(window).on('load', updateTables);
$(window).on(
"redraw",function() {
switched = false;