Merge remote branch 'origin/master' into translation-staging

This commit is contained in:
TeamCity 2012-10-09 05:19:08 +13:00
commit 4813bf7ada
22 changed files with 41 additions and 45 deletions

View File

@ -206,7 +206,9 @@
* Function: onclick
*/
onclick: function(e) {
this.parents('form').trigger('submit', [this]);
if(!this.is(':disabled')) {
this.parents('form').trigger('submit', [this]);
}
e.preventDefault();
return false;
}

View File

@ -32,7 +32,7 @@
<?php if(isset($hasErrorOtherThanDatabase)) { ?>
<p class="message error">
You aren't currently able to install the software. Please <a href="#requirements">see below</a> for details.<br>
If you are having problems meeting the requirements, see the <a href="http://doc.silverstripe.org/sapphire/en/installation/server-requirements">server requirements</a>.
If you are having problems meeting the requirements, see the <a href="http://doc.silverstripe.org/framework/en/installation/server-requirements">server requirements</a>.
</p>
<?php if (isset($phpIniLocation)) { ?>
<p>Your php.ini file is located at <?php echo $phpIniLocation; ?></p>
@ -46,7 +46,7 @@
<?php } else if($req->hasWarnings()) { ?>
<div class="message warning">
<p>There are some issues that we recommend you look at before installing, however, you are still able to install the software.
<br>Please see below for details. If you are having problems meeting the requirements, see the <a href="http://doc.silverstripe.org/sapphire/en/installation/server-requirements">server requirements</a>.</p>
<br>Please see below for details. If you are having problems meeting the requirements, see the <a href="http://doc.silverstripe.org/framework/en/installation/server-requirements">server requirements</a>.</p>
</div>
<?php } else if(!$dbReq->hasErrors() && !$adminReq->hasErrors()) { ?>
<div class="message goodInstall"><p>You're ready to install! Please confirm the configuration options below. <a href="#install">Install SilverStripe</a></p>
@ -71,7 +71,7 @@
<?php $dbReq->showTable(); ?>
<p class="helpText requirementsHelpText">
Read more about our <a href="http://doc.silverstripe.org/sapphire/en/installation/server-requirements" target="_blank">server requirements</a>.
Read more about our <a href="http://doc.silverstripe.org/framework/en/installation/server-requirements" target="_blank">server requirements</a>.
</p>
<div class="action">
@ -178,7 +178,7 @@
<?php if($envFileExists) { ?>
<div id="use_environment_field" class="field">
<input id="use_environment" type="checkbox" name="useEnv" <?php if($usingEnv) echo "checked=\"checked\"" ?>>
<label for="use_environment">Use _ss_environment file for configuration (<a href="http://doc.silverstripe.org/sapphire/en/topics/environment-management" target="_blank">?</a>)</label>
<label for="use_environment">Use _ss_environment file for configuration (<a href="http://doc.silverstripe.org/framework/en/topics/environment-management" target="_blank">?</a>)</label>
</div>
<?php } ?>
@ -244,7 +244,7 @@
<h3 class="sectionHeading">Theme selection <small>Step 4 of 5</small></h3>
<p class="helpText">You can change the theme or <a href="http://silverstripe.org/themes">download</a> another from the SilverStripe website after installation.</p>
<ul id="Themes">
<li><input type="radio" name="template" value="simple" id="Simple" <?php if(!isset($_POST['template']) || $_POST['template'] == 'simple') {?>checked="checked"<?php }?>><label for="Simple"><a href="https://github.com/silverstripe-themes/silverstripe-simple">Simple</a> - our default theme ready to use, or begin the <a href="http://doc.silverstripe.org/sapphire/en/tutorials" target="_blank">tutorial</a>.</label></li>
<li><input type="radio" name="template" value="simple" id="Simple" <?php if(!isset($_POST['template']) || $_POST['template'] == 'simple') {?>checked="checked"<?php }?>><label for="Simple"><a href="https://github.com/silverstripe-themes/silverstripe-simple">Simple</a> - our default theme ready to use, or begin the <a href="http://doc.silverstripe.org/framework/en/tutorials" target="_blank">tutorial</a>.</label></li>
<li><input type="radio" name="template" value="tutorial" id="EmptyTemplate" <?php if(isset($_POST['template']) && $_POST['template'] == 'tutorial') {?>checked="checked"<?php }?>><label for="EmptyTemplate">Empty template</label></li>
</ul>
<h3 class="sectionHeading" id="install">Confirm Install <small>Step 5 of 5</small></h3>

View File

@ -1,7 +1,7 @@
<html>
<head>
<title>PHP 5.3.2 is required</title>
<link rel="stylesheet" type="text/css" href="sapphire/dev/install/css/install.css">
<link rel="stylesheet" type="text/css" href="framework/dev/install/css/install.css">
</head>
<body>
<div id="BgContainer">

View File

@ -8,4 +8,5 @@
* Deprecated `Profiler` class, use third-party solutions like [xhprof](https://github.com/facebook/xhprof/)
* Removed defunct or unnecessary debug GET parameters:
`debug_profile`, `debug_memory`, `profile_trace`, `debug_javascript`, `debug_behaviour`
* Removed `Member_ProfileForm`, use `CMSProfileController` instead
* Removed `Member_ProfileForm`, use `CMSProfileController` instead
* `SiteTree::$nested_urls` enabled by default. To disable, call `SiteTree::disable_nested_urls()`.

View File

@ -104,6 +104,7 @@ All forms have some basic validation built in email fields will only let the
The framework comes with a predefined validator called `[api:RequiredFields]`, which performs the common task of making sure particular fields are filled out. Below is the code to add validation to a contact form:
:::php
public function Form() {
// ...
$validator = new RequiredFields('Name', 'Message');

View File

@ -16,7 +16,7 @@ Please read our [guide to contributing documentation](misc/contributing#writing-
### Level 1: Building your first SilverStripe website
* [Introduction to PHP5 (zend.com)](http://devzone.zend.com/node/view/id/627)
* [Introduction to PHP5 (zend.com)](http://devzone.zend.com/6/php-101--php-for-the-absolute-beginner)
* [Tutorials](tutorials)
* [1. Building a basic site](tutorials/1-building-a-basic-site)
* [2. Extending a basic site](tutorials/2-extending-a-basic-site)
@ -49,7 +49,6 @@ Please read our [guide to contributing documentation](misc/contributing#writing-
* [Debugging](topics/debugging)
* [Errorhandling](topics/error-handling)
* [Testing Guide](topics/testing/): Framework for automated testing like Unittests
* [Built-in Page Controls](reference/built-in-page-controls)
* [Execution Pipeline](reference/execution-pipeline): Tracking a request from director to template-rendering
* [Recipes/Howtos](howto/)

View File

@ -27,7 +27,7 @@ class you want to extend.
### Adding a extension to a built-in class
Sometimes you will want to add extension to classes that you didn't make. For example, you might want to add the
`[api:ForumRole]` extension to the `[api:Member]` object.
ForumRole extension to the `[api:Member]` object.
:::php
@ -38,7 +38,7 @@ For example above we want to override Member with a Custom Member so we would wr
:::php
// add to mysite/_config.php
Object::add_extension('Member', 'CustomMember');</code>
Object::add_extension('Member', 'CustomMember');
## Implementation

View File

@ -4,7 +4,6 @@ Reference articles complement our auto-generated [API docs](http://api.silverstr
* [Advanced templates](advanced-templates): Advanced SilverStripe template syntax
* [BBCode](bbcode): Extensible shortcode syntax
* [Built-in page controls](built-in-page-controls): Explains the template syntax and available variables/placeholders
* [ComplexTableField](complextablefield): Manage records and their relations inside the CMS
* [Database Structure](database-structure): Conventions and best practices for database tables and fields
* [DataObject](dataobject): Base class for database records

View File

@ -68,7 +68,8 @@ If a variable returns a string, that string will be inserted into the template.
the system will attempt to render the object through its forTemplate() method. If the `forTemplate()` method has not been
defined, the system will return an error.
SilverStripe provides lots of properties and methods. For more details on built-in page controls and variables, see http://doc.silverstripe.org/framework/en/reference/built-in-page-controls
SilverStripe provides many additional properties on the `SiteTree` class,
see [Page Type Templates](/topics/page-type-templates) for details.
### Escaping

View File

@ -129,20 +129,20 @@ class ComplexTableField extends TableListField {
public $actions = array(
'show' => array(
'label' => 'Show',
'icon' => 'sapphire/images/show.png',
'icon_disabled' => 'sapphire/images/show_disabled.png',
'icon' => 'framework/images/show.png',
'icon_disabled' => 'framework/images/show_disabled.png',
'class' => 'popuplink showlink',
),
'edit' => array(
'label' => 'Edit',
'icon' => 'sapphire/images/edit.gif',
'icon_disabled' => 'sapphire/images/edit_disabled.gif',
'icon' => 'framework/images/edit.gif',
'icon_disabled' => 'framework/images/edit_disabled.gif',
'class' => 'popuplink editlink',
),
'delete' => array(
'label' => 'Delete',
'icon' => 'sapphire/images/delete.gif',
'icon_disabled' => 'sapphire/images/delete_disabled.gif',
'icon' => 'framework/images/delete.gif',
'icon_disabled' => 'framework/images/delete_disabled.gif',
'class' => 'popuplink deletelink',
),
);

View File

@ -37,7 +37,7 @@ require_once 'Zend/Date.php';
* configuration accordingly. Changing the locale through {@link setLocale()} will not update the
* `dateformat` configuration automatically.
*
* See http://doc.silverstripe.org/sapphire/en/topics/i18n for more information about localizing form fields.
* See http://doc.silverstripe.org/framework/en/topics/i18n for more information about localizing form fields.
*
* # Usage
*

View File

@ -104,8 +104,8 @@ class TableListField extends FormField {
* array(
* 'delete' => array(
* 'label' => 'Delete',
* 'icon' => 'sapphire/images/delete.gif',
* 'icon_disabled' => 'sapphire/images/delete_disabled.gif',
* 'icon' => 'framework/images/delete.gif',
* 'icon_disabled' => 'framework/images/delete_disabled.gif',
* 'class' => 'deletelink',
* )
* )
@ -113,8 +113,8 @@ class TableListField extends FormField {
public $actions = array(
'delete' => array(
'label' => 'Delete',
'icon' => 'sapphire/images/delete.gif',
'icon_disabled' => 'sapphire/images/delete_disabled.gif',
'icon' => 'framework/images/delete.gif',
'icon_disabled' => 'framework/images/delete_disabled.gif',
'class' => 'deletelink'
)
);
@ -238,9 +238,6 @@ class TableListField extends FormField {
*/
public function __construct($name, $sourceClass = null, $fieldList = null, $sourceFilter = null,
$sourceSort = null, $sourceJoin = null) {
if(FRAMEWORK_DIR != 'sapphire' && !SapphireTest::is_running_test()) {
user_error('TableListField requires FRAMEWORK_DIR to be sapphire.', E_USER_WARNING);
}
if($sourceClass) {
// You can optionally pass a list
@ -1106,7 +1103,6 @@ JS
Requirements::css(CMS_DIR . '/css/typography.css');
Requirements::css(CMS_DIR . '/css/cms_right.css');
}
Requirements::css('sapphire/css/TableListField_print.css');
$this->cachedSourceItems = null;
$oldShowPagination = $this->showPagination;

View File

@ -4,7 +4,7 @@
* as defined by the {@link RelationList} passed to the GridField constructor.
* Objects can be searched through an input field (partially matching one or more fields).
* Selecting from the results will add the object to the relation.
* Often used alongside {@link GridFieldRemoveButton} for detaching existing records from a relatinship.
* Often used alongside {@link GridFieldDeleteAction} for detaching existing records from a relatinship.
* For easier setup, have a look at a sample configuration in {@link GridFieldConfig_RelationEditor}.
*/
class GridFieldAddExistingAutocompleter

View File

@ -61,10 +61,10 @@ TableField.prototype = {
return false;
}
// TODO ajaxErrorHandler and loading-image are dependent on cms, but formfield is in sapphire
// TODO ajaxErrorHandler and loading-image are dependent on cms, but formfield is in framework
var confirmed = confirm(ss.i18n._t('TABLEFIELD.DELETECONFIRMMESSAGE', 'Are you sure you want to delete this record?'));
if(confirmed){
img.setAttribute("src",'sapphire/images/network-save.gif'); // TODO doesn't work
img.setAttribute("src",'framework/images/network-save.gif'); // TODO doesn't work
jQuery.ajax({
'url': link.getAttribute("href"),
'method': 'post',

View File

@ -92,11 +92,11 @@ TableListField.prototype = {
var row = Event.findElement(e,"tr");
var self = this;
// TODO ajaxErrorHandler and loading-image are dependent on cms, but formfield is in sapphire
// TODO ajaxErrorHandler and loading-image are dependent on cms, but formfield is in framework
var confirmed = confirm(ss.i18n._t('TABLEFIELD.DELETECONFIRMMESSAGE', 'Are you sure you want to delete this record?'));
if(confirmed)
{
img.setAttribute("src",'sapphire/images/network-save.gif'); // TODO doesn't work
img.setAttribute("src",'framework/images/network-save.gif'); // TODO doesn't work
jQuery.ajax({
'url': link.getAttribute("href"),
'method': 'post',

View File

@ -4,7 +4,7 @@ if(typeof(ss) == 'undefined') ss = {};
* Lightweight clientside i18n implementation.
* Caution: Only available after DOM loaded because we need to detect the language
*
* For non-i18n stub implementation, see sapphire/javascript/i18nx.js
* For non-i18n stub implementation, see framework/javascript/i18nx.js
*
* Based on jQuery i18n plugin: 1.0.0 Feb-10-2008
*

View File

@ -2,7 +2,7 @@ if(typeof(ss) == 'undefined') ss = {};
/**
* Stub implementation for ss.i18n code.
* Use instead of sapphire/javascript/i18n.js
* Use instead of framework/javascript/i18n.js
* if you want to use any SilverStripe javascript
* without internationalization support.
*/

View File

@ -1556,7 +1556,7 @@ class Member_Validator extends RequiredFields {
}
if($id && is_object($member) && $member->ID != $id) {
$uniqueField = $this->form->dataFieldByName($identifierField);
$uniqueField = $this->form->Fields()->dataFieldByName($identifierField);
$this->validationError(
$uniqueField->id(),
_t(

View File

@ -2,7 +2,7 @@
/**
* Tests for the {@link SS_ClassManifest} class.
*
* @package sapphire
* @package framework
* @subpackage tests
*/
class ClassLoaderTest extends SapphireTest {

View File

@ -16,7 +16,4 @@ MySQLDatabase::set_connection_charset('utf8');
// Set the current theme. More themes can be downloaded from
// http://www.silverstripe.org/themes/
SSViewer::set_theme('simple');
// Enable nested URLs for this site (e.g. page/sub-page/)
if(class_exists('SiteTree')) SiteTree::enable_nested_urls();
SSViewer::set_theme('simple');

View File

@ -20,9 +20,9 @@ var GB_ONLY_ONE = null;
// modified 2006-01-06 by Silverstripe Ltd.
try {
var theBaseHref = document.getElementsByTagName("base")[0].href;
var GB_IMG_DIR = theBaseHref + "sapphire/thirdparty/greybox/";
var GB_IMG_DIR = theBaseHref + "framework/thirdparty/greybox/";
} catch(err) {
var GB_IMG_DIR = "sapphire/thirdparty/greybox/";
var GB_IMG_DIR = "framework/thirdparty/greybox/";
}
function GreyBox() {

View File

@ -46,7 +46,7 @@ error_reporting(E_ALL | E_STRICT);
* distribution.
*/
$ds = DIRECTORY_SEPARATOR;
$zfRoot = realpath(dirname(dirname(dirname(__FILE__)))) . $ds . 'sapphire' . $ds . 'thirdparty';
$zfRoot = realpath(dirname(dirname(dirname(__FILE__)))) . $ds . 'framework' . $ds . 'thirdparty';
$zfCoreLibrary = "$zfRoot";
$zfCoreTests = "$zfRoot/tests";
$zfCustomLibrary = realpath(dirname(dirname(__FILE__))) . $ds . 'library';