Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
chillu committed Oct 8, 2012
2 parents e3a27ea + b38cb39 commit d1ee761
Show file tree
Hide file tree
Showing 20 changed files with 38 additions and 40 deletions.
4 changes: 3 additions & 1 deletion admin/javascript/LeftAndMain.EditForm.js
Expand Up @@ -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;
}
Expand Down
10 changes: 5 additions & 5 deletions dev/install/config-form.html
Expand Up @@ -32,7 +32,7 @@ <h2>CMS / Framework Installation <?php if($silverstripe_version) echo "<small>Ve
<?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>
Expand All @@ -46,7 +46,7 @@ <h2>CMS / Framework Installation <?php if($silverstripe_version) echo "<small>Ve
<?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>
Expand All @@ -71,7 +71,7 @@ <h3 class="sectionHeading" id="requirements">Requirements <small>Step 1 of 5</sm
<?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">
Expand Down Expand Up @@ -178,7 +178,7 @@ <h3 class="sectionHeading">Database Configuration <small>Step 2 of 5</small></h3
<?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 } ?>

Expand Down Expand Up @@ -244,7 +244,7 @@ <h3 class="sectionHeading">CMS Admin Account <small>Step 3 of 5</small></h3>
<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>
Expand Down
2 changes: 1 addition & 1 deletion dev/install/php5-required.html
@@ -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">
Expand Down
1 change: 1 addition & 0 deletions docs/en/howto/simple-contact-form.md
Expand Up @@ -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');
Expand Down
3 changes: 1 addition & 2 deletions docs/en/index.md
Expand Up @@ -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)
Expand Down Expand Up @@ -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/)

Expand Down
4 changes: 2 additions & 2 deletions docs/en/reference/dataextension.md
Expand Up @@ -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
Expand All @@ -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

Expand Down
1 change: 0 additions & 1 deletion docs/en/reference/index.md
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion docs/en/reference/templates.md
Expand Up @@ -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

Expand Down
12 changes: 6 additions & 6 deletions forms/ComplexTableField.php
Expand Up @@ -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',
),
);
Expand Down
2 changes: 1 addition & 1 deletion forms/DateField.php
Expand Up @@ -37,7 +37,7 @@
* 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
*
Expand Down
12 changes: 4 additions & 8 deletions forms/TableListField.php
Expand Up @@ -104,17 +104,17 @@ 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',
* )
* )
*/
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'
)
);
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -1106,7 +1103,6 @@ public function printall() {
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;
Expand Down
2 changes: 1 addition & 1 deletion forms/gridfield/GridFieldAddExistingAutocompleter.php
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions javascript/TableField.js
Expand Up @@ -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',
Expand Down
4 changes: 2 additions & 2 deletions javascript/TableListField.js
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion javascript/i18n.js
Expand Up @@ -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
*
Expand Down
2 changes: 1 addition & 1 deletion javascript/i18nx.js
Expand Up @@ -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.
*/
Expand Down
2 changes: 1 addition & 1 deletion security/Member.php
Expand Up @@ -1556,7 +1556,7 @@ public function php($data) {
}

if($id && is_object($member) && $member->ID != $id) {
$uniqueField = $this->form->dataFieldByName($identifierField);
$uniqueField = $this->form->Fields()->dataFieldByName($identifierField);
$this->validationError(
$uniqueField->id(),
_t(
Expand Down
2 changes: 1 addition & 1 deletion tests/core/manifest/ClassLoaderTest.php
Expand Up @@ -2,7 +2,7 @@
/**
* Tests for the {@link SS_ClassManifest} class.
*
* @package sapphire
* @package framework
* @subpackage tests
*/
class ClassLoaderTest extends SapphireTest {
Expand Down
4 changes: 2 additions & 2 deletions thirdparty/greybox/greybox.js
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion thirdparty/zend_translate_railsyaml/tests/TestHelper.php
Expand Up @@ -46,7 +46,7 @@
* 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';
Expand Down

0 comments on commit d1ee761

Please sign in to comment.