Merge remote-tracking branch 'origin/3.2' into 3

Conflicts:
	admin/css/screen.css
This commit is contained in:
Dan Hensby 2015-07-20 14:08:36 +00:00
commit 64ceba133c
57 changed files with 1728 additions and 968 deletions

View File

@ -1,5 +1,16 @@
language: php language: php
sudo: false
addons:
apt:
packages:
- tidy
cache:
directories:
- $HOME/.composer/cache
php: php:
- 5.4 - 5.4
@ -38,9 +49,6 @@ matrix:
env: DB=MYSQL env: DB=MYSQL
- php: hhvm - php: hhvm
env: DB=MYSQL env: DB=MYSQL
before_install:
- sudo apt-get update -qq
- sudo apt-get install -y tidy
before_script: before_script:
- composer self-update || true - composer self-update || true

View File

@ -13,3 +13,8 @@ Name: defaulti18n
i18n: i18n:
module_priority: module_priority:
- other_modules - other_modules
---
Name: textcollector
---
Injector:
i18nTextCollector_Writer: 'i18nTextCollector_Writer_RailsYaml'

View File

@ -142,7 +142,7 @@ class CMSMenu extends Object implements IteratorAggregate, i18nEntityProvider {
$cmsClasses = self::get_cms_classes(); $cmsClasses = self::get_cms_classes();
foreach($cmsClasses as $cmsClass) { foreach($cmsClasses as $cmsClass) {
$menuItem = self::menuitem_for_controller($cmsClass); $menuItem = self::menuitem_for_controller($cmsClass);
if($menuItem) $menuItems[$cmsClass] = $menuItem; if($menuItem) $menuItems[Convert::raw2htmlname(str_replace('\\', '-', $cmsClass))] = $menuItem;
} }
} }

View File

@ -555,7 +555,7 @@ class LeftAndMain extends Controller implements PermissionProvider {
public static function menu_icon_for_class($class) { public static function menu_icon_for_class($class) {
$icon = Config::inst()->get($class, 'menu_icon', Config::FIRST_SET); $icon = Config::inst()->get($class, 'menu_icon', Config::FIRST_SET);
if (!empty($icon)) { if (!empty($icon)) {
$class = strtolower($class); $class = strtolower(Convert::raw2htmlname(str_replace('\\', '-', $class)));
return ".icon.icon-16.icon-{$class} { background: url('{$icon}'); } "; return ".icon.icon-16.icon-{$class} { background: url('{$icon}'); } ";
} }
return ''; return '';
@ -1962,8 +1962,9 @@ class LeftAndMain_TreeNode extends ViewableData {
$obj = $this->obj; $obj = $this->obj;
return "<li id=\"record-$obj->ID\" data-id=\"$obj->ID\" data-pagetype=\"$obj->ClassName\" class=\"" return "<li id=\"record-$obj->ID\" data-id=\"$obj->ID\" data-pagetype=\"$obj->ClassName\" class=\""
. $this->getClasses() . "\">" . "<ins class=\"jstree-icon\">&nbsp;</ins>" . $this->getClasses() . "\">" . "<ins class=\"jstree-icon\">&nbsp;</ins>"
. "<a href=\"" . $this->getLink() . "\" title=\"" . _t('LeftAndMain.PAGETYPE','Page type: ') . "<a href=\"" . $this->getLink() . "\" title=\"("
. "$obj->class\" ><ins class=\"jstree-icon\">&nbsp;</ins><span class=\"text\">" . ($obj->TreeTitle) . trim(_t('LeftAndMain.PAGETYPE','Page type'), " :") // account for inconsistencies in translations
. ": " . $obj->i18n_singular_name() . ") $obj->Title\" ><ins class=\"jstree-icon\">&nbsp;</ins><span class=\"text\">" . ($obj->TreeTitle)
. "</span></a>"; . "</span></a>";
} }

View File

@ -256,7 +256,7 @@ form.small .field input.text, form.small .field textarea, form.small .field sele
.cms .ss-ui-button.ui-state-hover, .cms .ss-ui-button:hover { text-decoration: none; background-color: white; background: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2U2ZTZlNiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(100%, #e6e6e6)); background: -moz-linear-gradient(#ffffff, #e6e6e6); background: -webkit-linear-gradient(#ffffff, #e6e6e6); background: linear-gradient(#ffffff, #e6e6e6); -moz-box-shadow: 0 0 5px #b3b3b3; -webkit-box-shadow: 0 0 5px #b3b3b3; box-shadow: 0 0 5px #b3b3b3; } .cms .ss-ui-button.ui-state-hover, .cms .ss-ui-button:hover { text-decoration: none; background-color: white; background: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2U2ZTZlNiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(100%, #e6e6e6)); background: -moz-linear-gradient(#ffffff, #e6e6e6); background: -webkit-linear-gradient(#ffffff, #e6e6e6); background: linear-gradient(#ffffff, #e6e6e6); -moz-box-shadow: 0 0 5px #b3b3b3; -webkit-box-shadow: 0 0 5px #b3b3b3; box-shadow: 0 0 5px #b3b3b3; }
.cms .ss-ui-button:active, .cms .ss-ui-button:focus, .cms .ss-ui-button.ui-state-active, .cms .ss-ui-button.ui-state-focus { border: 1px solid #b3b3b3; background-color: white; background: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2U2ZTZlNiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(100%, #e6e6e6)); background: -moz-linear-gradient(#ffffff, #e6e6e6); background: -webkit-linear-gradient(#ffffff, #e6e6e6); background: linear-gradient(#ffffff, #e6e6e6); -moz-box-shadow: 0 0 5px #b3b3b3 inset; -webkit-box-shadow: 0 0 5px #b3b3b3 inset; box-shadow: 0 0 5px #b3b3b3 inset; } .cms .ss-ui-button:active, .cms .ss-ui-button:focus, .cms .ss-ui-button.ui-state-active, .cms .ss-ui-button.ui-state-focus { border: 1px solid #b3b3b3; background-color: white; background: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2U2ZTZlNiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(100%, #e6e6e6)); background: -moz-linear-gradient(#ffffff, #e6e6e6); background: -webkit-linear-gradient(#ffffff, #e6e6e6); background: linear-gradient(#ffffff, #e6e6e6); -moz-box-shadow: 0 0 5px #b3b3b3 inset; -webkit-box-shadow: 0 0 5px #b3b3b3 inset; box-shadow: 0 0 5px #b3b3b3 inset; }
.cms .ss-ui-button.ss-ui-action-minor span { padding-left: 0; padding-right: 0; } .cms .ss-ui-button.ss-ui-action-minor span { padding-left: 0; padding-right: 0; }
.cms .ss-ui-button.ss-ui-action-constructive { text-shadow: none; font-weight: bold; color: white; border-color: #1F9433; border-bottom-color: #166a24; background-color: #1F9433; background: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzk0YmU0MiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzFmOTQzMyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #94be42), color-stop(100%, #1f9433)); background: -moz-linear-gradient(#94be42, #1f9433); background: -webkit-linear-gradient(#94be42, #1f9433); background: linear-gradient(#94be42, #1f9433); text-shadow: #1c872f 0 -1px -1px; } .cms .ss-ui-button.ss-ui-action-constructive { text-shadow: none; font-weight: bold; color: white; border-color: #1F9433; border-bottom-color: #166a24; background-color: #1F9433; background: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzkzYmU0MiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzFmOTQzMyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #93be42), color-stop(100%, #1f9433)); background: -moz-linear-gradient(#93be42, #1f9433); background: -webkit-linear-gradient(#93be42, #1f9433); background: linear-gradient(#93be42, #1f9433); text-shadow: #1c872f 0 -1px -1px; }
.cms .ss-ui-button.ss-ui-action-constructive.ui-state-hover, .cms .ss-ui-button.ss-ui-action-constructive:hover { border-color: #166a24; background-color: #1F9433; background: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2E0Y2EzYSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzIzYTkzYSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #a4ca3a), color-stop(100%, #23a93a)); background: -moz-linear-gradient(#a4ca3a, #23a93a); background: -webkit-linear-gradient(#a4ca3a, #23a93a); background: linear-gradient(#a4ca3a, #23a93a); } .cms .ss-ui-button.ss-ui-action-constructive.ui-state-hover, .cms .ss-ui-button.ss-ui-action-constructive:hover { border-color: #166a24; background-color: #1F9433; background: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2E0Y2EzYSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzIzYTkzYSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #a4ca3a), color-stop(100%, #23a93a)); background: -moz-linear-gradient(#a4ca3a, #23a93a); background: -webkit-linear-gradient(#a4ca3a, #23a93a); background: linear-gradient(#a4ca3a, #23a93a); }
.cms .ss-ui-button.ss-ui-action-constructive:active, .cms .ss-ui-button.ss-ui-action-constructive:focus, .cms .ss-ui-button.ss-ui-action-constructive.ui-state-active, .cms .ss-ui-button.ss-ui-action-constructive.ui-state-focus { background-color: #1d8c30; -moz-box-shadow: inset 0 1px 3px #17181a, 0 1px 0 rgba(255, 255, 255, 0.6); -webkit-box-shadow: inset 0 1px 3px #17181a, 0 1px 0 rgba(255, 255, 255, 0.6); box-shadow: inset 0 1px 3px #17181a, 0 1px 0 rgba(255, 255, 255, 0.6); } .cms .ss-ui-button.ss-ui-action-constructive:active, .cms .ss-ui-button.ss-ui-action-constructive:focus, .cms .ss-ui-button.ss-ui-action-constructive.ui-state-active, .cms .ss-ui-button.ss-ui-action-constructive.ui-state-focus { background-color: #1d8c30; -moz-box-shadow: inset 0 1px 3px #17181a, 0 1px 0 rgba(255, 255, 255, 0.6); -webkit-box-shadow: inset 0 1px 3px #17181a, 0 1px 0 rgba(255, 255, 255, 0.6); box-shadow: inset 0 1px 3px #17181a, 0 1px 0 rgba(255, 255, 255, 0.6); }
.cms .ss-ui-button.ss-ui-action-destructive { color: #f00; background-color: #e6e6e6; } .cms .ss-ui-button.ss-ui-action-destructive { color: #f00; background-color: #e6e6e6; }
@ -882,7 +882,8 @@ form.import-form label.left { width: 250px; }
.cms .jstree a, .TreeDropdownField .treedropdownfield-panel .jstree a { display: inline-block; line-height: 16px; height: 16px; color: black; white-space: nowrap; text-decoration: none; padding: 1px 2px; margin: 0; border: 1px solid #fff; } .cms .jstree a, .TreeDropdownField .treedropdownfield-panel .jstree a { display: inline-block; line-height: 16px; height: 16px; color: black; white-space: nowrap; text-decoration: none; padding: 1px 2px; margin: 0; border: 1px solid #fff; }
.cms .jstree a:focus, .cms .jstree a:active, .cms .jstree a:hover, .TreeDropdownField .treedropdownfield-panel .jstree a:focus, .TreeDropdownField .treedropdownfield-panel .jstree a:active, .TreeDropdownField .treedropdownfield-panel .jstree a:hover { text-decoration: none; cursor: pointer; text-shadow: 1px 1px 1px white; } .cms .jstree a:focus, .cms .jstree a:active, .cms .jstree a:hover, .TreeDropdownField .treedropdownfield-panel .jstree a:focus, .TreeDropdownField .treedropdownfield-panel .jstree a:active, .TreeDropdownField .treedropdownfield-panel .jstree a:hover { text-decoration: none; cursor: pointer; text-shadow: 1px 1px 1px white; }
.cms .jstree a ins, .TreeDropdownField .treedropdownfield-panel .jstree a ins { height: 16px; width: 12px; } .cms .jstree a ins, .TreeDropdownField .treedropdownfield-panel .jstree a ins { height: 16px; width: 12px; }
.cms .jstree a ins.jstree-checkbox, .TreeDropdownField .treedropdownfield-panel .jstree a ins.jstree-checkbox { height: 19px; width: 16px; } .cms .jstree a ins.jstree-checkbox, .TreeDropdownField .treedropdownfield-panel .jstree a ins.jstree-checkbox { width: 16px; position: relative; }
.cms .jstree a ins.jstree-checkbox:before, .TreeDropdownField .treedropdownfield-panel .jstree a ins.jstree-checkbox:before { content: ''; display: block; position: absolute; z-index: 1; left: -3px; top: -3px; height: 22px; width: 25px; }
.cms .jstree .jstree-real-checkbox, .TreeDropdownField .treedropdownfield-panel .jstree .jstree-real-checkbox { display: none; } .cms .jstree .jstree-real-checkbox, .TreeDropdownField .treedropdownfield-panel .jstree .jstree-real-checkbox { display: none; }
.cms .jstree .jstree-wholerow-real, .TreeDropdownField .treedropdownfield-panel .jstree .jstree-wholerow-real { position: relative; z-index: 1; } .cms .jstree .jstree-wholerow-real, .TreeDropdownField .treedropdownfield-panel .jstree .jstree-wholerow-real { position: relative; z-index: 1; }
.cms .jstree .jstree-wholerow-real li, .TreeDropdownField .treedropdownfield-panel .jstree .jstree-wholerow-real li { cursor: pointer; } .cms .jstree .jstree-wholerow-real li, .TreeDropdownField .treedropdownfield-panel .jstree .jstree-wholerow-real li { cursor: pointer; }
@ -943,7 +944,7 @@ form.import-form label.left { width: 250px; }
.tree-holder.jstree li.Root strong, .cms-tree.jstree li.Root strong { font-weight: bold; padding-left: 1px; } .tree-holder.jstree li.Root strong, .cms-tree.jstree li.Root strong { font-weight: bold; padding-left: 1px; }
.tree-holder.jstree li.Root > a .jstree-icon, .cms-tree.jstree li.Root > a .jstree-icon { background-position: -56px -36px; } .tree-holder.jstree li.Root > a .jstree-icon, .cms-tree.jstree li.Root > a .jstree-icon { background-position: -56px -36px; }
.tree-holder.jstree li.status-deletedonlive > a .text, .tree-holder.jstree li.status-deletedonlive > a:link .text, .tree-holder.jstree li.status-archived > a .text, .tree-holder.jstree li.status-archived > a:link .text, .cms-tree.jstree li.status-deletedonlive > a .text, .cms-tree.jstree li.status-deletedonlive > a:link .text, .cms-tree.jstree li.status-archived > a .text, .cms-tree.jstree li.status-archived > a:link .text { text-decoration: line-through; } .tree-holder.jstree li.status-deletedonlive > a .text, .tree-holder.jstree li.status-deletedonlive > a:link .text, .tree-holder.jstree li.status-archived > a .text, .tree-holder.jstree li.status-archived > a:link .text, .cms-tree.jstree li.status-deletedonlive > a .text, .cms-tree.jstree li.status-deletedonlive > a:link .text, .cms-tree.jstree li.status-archived > a .text, .cms-tree.jstree li.status-archived > a:link .text { text-decoration: line-through; }
.tree-holder.jstree li.jstree-checked > a, .tree-holder.jstree li.jstree-checked > a:link, .cms-tree.jstree li.jstree-checked > a, .cms-tree.jstree li.jstree-checked > a:link { background-color: #efe999; } .tree-holder.jstree li.jstree-checked > a, .tree-holder.jstree li.jstree-checked > a:link, .cms-tree.jstree li.jstree-checked > a, .cms-tree.jstree li.jstree-checked > a:link { background-color: #fffcdc; }
.tree-holder.jstree li.disabled > a, .tree-holder.jstree li.disabled > a:link, .tree-holder.jstree li.edit-disabled > a, .tree-holder.jstree li.edit-disabled > a:link, .cms-tree.jstree li.disabled > a, .cms-tree.jstree li.disabled > a:link, .cms-tree.jstree li.edit-disabled > a, .cms-tree.jstree li.edit-disabled > a:link { color: #aaa; background-color: transparent; cursor: default; } .tree-holder.jstree li.disabled > a, .tree-holder.jstree li.disabled > a:link, .tree-holder.jstree li.edit-disabled > a, .tree-holder.jstree li.edit-disabled > a:link, .cms-tree.jstree li.disabled > a, .cms-tree.jstree li.disabled > a:link, .cms-tree.jstree li.edit-disabled > a, .cms-tree.jstree li.edit-disabled > a:link { color: #aaa; background-color: transparent; cursor: default; }
.tree-holder.jstree li.disabled > a > .jstree-checkbox, .tree-holder.jstree li.disabled > a:link > .jstree-checkbox, .tree-holder.jstree li.edit-disabled > a > .jstree-checkbox, .tree-holder.jstree li.edit-disabled > a:link > .jstree-checkbox, .cms-tree.jstree li.disabled > a > .jstree-checkbox, .cms-tree.jstree li.disabled > a:link > .jstree-checkbox, .cms-tree.jstree li.edit-disabled > a > .jstree-checkbox, .cms-tree.jstree li.edit-disabled > a:link > .jstree-checkbox { background-position: -57px -54px; } .tree-holder.jstree li.disabled > a > .jstree-checkbox, .tree-holder.jstree li.disabled > a:link > .jstree-checkbox, .tree-holder.jstree li.edit-disabled > a > .jstree-checkbox, .tree-holder.jstree li.edit-disabled > a:link > .jstree-checkbox, .cms-tree.jstree li.disabled > a > .jstree-checkbox, .cms-tree.jstree li.disabled > a:link > .jstree-checkbox, .cms-tree.jstree li.edit-disabled > a > .jstree-checkbox, .cms-tree.jstree li.edit-disabled > a:link > .jstree-checkbox { background-position: -57px -54px; }
.tree-holder.jstree li.readonly, .cms-tree.jstree li.readonly { color: #aaa; padding-left: 18px; } .tree-holder.jstree li.readonly, .cms-tree.jstree li.readonly { color: #aaa; padding-left: 18px; }
@ -966,9 +967,17 @@ form.import-form label.left { width: 250px; }
.jstree-default a .jstree-icon, .jstree-default-rtl a .jstree-icon, .jstree-classic a .jstree-icon, .jstree-apple a .jstree-icon { background-position: -60px -19px; } .jstree-default a .jstree-icon, .jstree-default-rtl a .jstree-icon, .jstree-classic a .jstree-icon, .jstree-apple a .jstree-icon { background-position: -60px -19px; }
<<<<<<< HEAD
/** DEPRECATED: .cms-content-tools will be removed in 4.0 Use .cms-content-filters instead. Ensure status is visible in sidebar */ /** DEPRECATED: .cms-content-tools will be removed in 4.0 Use .cms-content-filters instead. Ensure status is visible in sidebar */
.cms-content-tools .cms-tree.jstree li { min-width: 159px; } .cms-content-tools .cms-tree.jstree li { min-width: 159px; }
.cms-content-tools .cms-tree.jstree a { overflow: hidden; display: block; position: relative; } .cms-content-tools .cms-tree.jstree a { overflow: hidden; display: block; position: relative; }
=======
.jstree-apple a { border-radius: 3px; }
/* ensure status is visible in sidebar */
.cms-content-tools .cms-tree.jstree li { min-width: 187px; }
.cms-content-tools .cms-tree.jstree a { overflow: hidden; text-overflow: ellipsis; display: block; position: relative; }
>>>>>>> origin/3.2
.cms-content-tools .cms-tree.jstree span.badge { position: absolute; top: 0; right: 0; padding: 7px 9px 6px 5px; margin: 0; max-width: 40%; -moz-transition: max-width 0.75s linear; -o-transition: max-width 0.75s linear; -webkit-transition: max-width 0.75s linear; transition: max-width 0.75s linear; } .cms-content-tools .cms-tree.jstree span.badge { position: absolute; top: 0; right: 0; padding: 7px 9px 6px 5px; margin: 0; max-width: 40%; -moz-transition: max-width 0.75s linear; -o-transition: max-width 0.75s linear; -webkit-transition: max-width 0.75s linear; transition: max-width 0.75s linear; }
.cms-content-tools .cms-tree.jstree span.badge:hover { max-width: 150px; } .cms-content-tools .cms-tree.jstree span.badge:hover { max-width: 150px; }
@ -978,45 +987,59 @@ li.class-RedirectorPage > a .jstree-pageicon { background-position: 0 -16px; }
li.class-VirtualPage > a .jstree-pageicon { background-position: 0 -32px; } li.class-VirtualPage > a .jstree-pageicon { background-position: 0 -32px; }
li.class-ErrorPage > a .jstree-pageicon { background-position: 0 -112px; } li.class-ErrorPage > a .jstree-pageicon { background-position: 0 -112px; }
/* tree status icons and labels */ /* Tree status labels and dots */
.cms-tree.jstree .status-modified > a .jstree-pageicon:before, .cms-tree.jstree .status-addedtodraft > a .jstree-pageicon:before, .cms-tree.jstree .status-deletedonlive > a .jstree-pageicon:before, .cms-tree.jstree .status-archived > a .jstree-pageicon:before, .cms-tree.jstree .status-removedfromdraft > a .jstree-pageicon:before, .cms-tree.jstree .status-workflow-approval > a .jstree-pageicon:before { content: ""; display: block; width: 5px; height: 5px; position: absolute; bottom: 0; right: 0; background: #fce2d0; border: 1px solid #ff9344; border-radius: 100px; box-shadow: 0px 0px 0px 1px #fff; } .jstree-apple .jstree-clicked, .jstree-apple .jstree-hovered { background: #ebfbff; }
.jstree .status-modified > .jstree-hovered, .jstree .status-modified > .jstree-clicked, .cms-tree.jstree span.badge.status-modified, .cms-tree.jstree .status-modified > a .jstree-pageicon:before { background-color: #FFF4ED; border-color: #EE6214; } .cms-tree.jstree .status-addedtodraft > a .jstree-pageicon:before, .cms-tree.jstree .status-modified > a .jstree-pageicon:before, .cms-tree.jstree .status-archived > a .jstree-pageicon:before, .cms-tree.jstree .status-deletedonlive > a .jstree-pageicon:before, .cms-tree.jstree .status-removedfromdraft > a .jstree-pageicon:before, .cms-tree.jstree .status-workflow-approval > a .jstree-pageicon:before { content: ""; display: block; width: 6px; height: 6px; position: absolute; bottom: 0; right: 0; background: #fce2d0; border: 1px solid #fff; border-radius: 100px; }
#cms-content-tools-CMSMain .cms-tree.jstree span.badge.status-modified { box-shadow: 0px 0px 6px 2px #FFF4ED; } .jstree .status-addedtodraft > .jstree-hovered, .jstree .status-addedtodraft > .jstree-clicked, .cms-tree.jstree span.badge.status-addedtodraft { background-color: #fff7f2; border-color: #F46B00; }
.cms-tree.jstree span.badge.status-modified { color: #EE6214; } .cms-tree.jstree span.badge.status-addedtodraft { color: #F46B00; }
.jstree .status-addedtodraft > .jstree-hovered, .jstree .status-addedtodraft > .jstree-clicked, .cms-tree.jstree span.badge.status-addedtodraft, .cms-tree.jstree .status-addedtodraft > a .jstree-pageicon:before { background-color: #FFF4ED; border-color: #EE6214; } .cms-tree.jstree .status-addedtodraft > a .jstree-pageicon:before { background-color: #ff7f22; -moz-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.3), inset 0 0 0 1px #F46B00; -webkit-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.3), inset 0 0 0 1px #F46B00; box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.3), inset 0 0 0 1px #F46B00; }
#cms-content-tools-CMSMain .cms-tree.jstree span.badge.status-addedtodraft { box-shadow: 0px 0px 6px 2px #FFF4ED; } #cms-content-tools-CMSMain .cms-tree.jstree span.badge.status-addedtodraft { -moz-box-shadow: 0px 0px 6px 2px #fff7f2; -webkit-box-shadow: 0px 0px 6px 2px #fff7f2; box-shadow: 0px 0px 6px 2px #fff7f2; }
.cms-tree.jstree span.badge.status-addedtodraft { color: #EE6214; } .jstree .status-modified > .jstree-hovered, .jstree .status-modified > .jstree-clicked, .cms-tree.jstree span.badge.status-modified { background-color: #fff7f2; border-color: #F46B00; }
.jstree .status-deletedonlive > .jstree-hovered, .jstree .status-deletedonlive > .jstree-clicked, .cms-tree.jstree span.badge.status-deletedonlive, .cms-tree.jstree .status-deletedonlive > a .jstree-pageicon:before { background-color: #F5F5F5; border-color: #5F7688; } .cms-tree.jstree span.badge.status-modified { color: #F46B00; }
#cms-content-tools-CMSMain .cms-tree.jstree span.badge.status-deletedonlive { box-shadow: 0px 0px 6px 2px #F5F5F5; } .cms-tree.jstree .status-modified > a .jstree-pageicon:before { background-color: #fff2e8; -moz-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.3), inset 0 0 0 1px #F46B00; -webkit-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.3), inset 0 0 0 1px #F46B00; box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.3), inset 0 0 0 1px #F46B00; }
.cms-tree.jstree span.badge.status-deletedonlive { color: #5F7688; } #cms-content-tools-CMSMain .cms-tree.jstree span.badge.status-modified { -moz-box-shadow: 0px 0px 6px 2px #fff7f2; -webkit-box-shadow: 0px 0px 6px 2px #fff7f2; box-shadow: 0px 0px 6px 2px #fff7f2; }
.jstree .status-archived > .jstree-hovered, .jstree .status-archived > .jstree-clicked, .cms-tree.jstree span.badge.status-archived, .cms-tree.jstree .status-archived > a .jstree-pageicon:before { background-color: #F5F5F5; border-color: #5F7688; } .jstree .status-archived > .jstree-hovered, .jstree .status-archived > .jstree-clicked, .cms-tree.jstree span.badge.status-archived { background-color: #f7f7f7; border-color: #455b6c; }
#cms-content-tools-CMSMain .cms-tree.jstree span.badge.status-archived { box-shadow: 0px 0px 6px 2px #F5F5F5; } .cms-tree.jstree span.badge.status-archived { color: #455b6c; }
.cms-tree.jstree span.badge.status-archived { color: #5F7688; } .cms-tree.jstree .status-archived > a .jstree-pageicon:before { background-color: #5F7688; -moz-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.3), inset 0 0 0 1px #455b6c; -webkit-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.3), inset 0 0 0 1px #455b6c; box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.3), inset 0 0 0 1px #455b6c; }
.jstree .status-removedfromdraft > .jstree-hovered, .jstree .status-removedfromdraft > .jstree-clicked, .cms-tree.jstree span.badge.status-removedfromdraft, .cms-tree.jstree .status-removedfromdraft > a .jstree-pageicon:before { background-color: #F5F5F5; border-color: #5F7688; } #cms-content-tools-CMSMain .cms-tree.jstree span.badge.status-archived { -moz-box-shadow: 0px 0px 6px 2px #f7f7f7; -webkit-box-shadow: 0px 0px 6px 2px #f7f7f7; box-shadow: 0px 0px 6px 2px #f7f7f7; }
#cms-content-tools-CMSMain .cms-tree.jstree span.badge.status-removedfromdraft { box-shadow: 0px 0px 6px 2px #F5F5F5; } .jstree .status-deletedonlive > .jstree-hovered, .jstree .status-deletedonlive > .jstree-clicked, .cms-tree.jstree span.badge.status-deletedonlive { background-color: #f7f7f7; border-color: #455b6c; }
.cms-tree.jstree span.badge.status-removedfromdraft { color: #5F7688; } .cms-tree.jstree span.badge.status-deletedonlive { color: #455b6c; }
.jstree .status-workflow-approval > .jstree-hovered, .jstree .status-workflow-approval > .jstree-clicked, .cms-tree.jstree span.badge.status-workflow-approval, .cms-tree.jstree .status-workflow-approval > a .jstree-pageicon:before { background-color: #E8FAFF; border-color: #0070B4; } .cms-tree.jstree .status-deletedonlive > a .jstree-pageicon:before { background-color: #f7f7f7; -moz-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.3), inset 0 0 0 1px #455b6c; -webkit-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.3), inset 0 0 0 1px #455b6c; box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.3), inset 0 0 0 1px #455b6c; }
#cms-content-tools-CMSMain .cms-tree.jstree span.badge.status-workflow-approval { box-shadow: 0px 0px 6px 2px #E8FAFF; } #cms-content-tools-CMSMain .cms-tree.jstree span.badge.status-deletedonlive { -moz-box-shadow: 0px 0px 6px 2px #f7f7f7; -webkit-box-shadow: 0px 0px 6px 2px #f7f7f7; box-shadow: 0px 0px 6px 2px #f7f7f7; }
.jstree .status-removedfromdraft > .jstree-hovered, .jstree .status-removedfromdraft > .jstree-clicked, .cms-tree.jstree span.badge.status-removedfromdraft { background-color: #f7f7f7; border-color: #455b6c; }
.cms-tree.jstree span.badge.status-removedfromdraft { color: #455b6c; }
.cms-tree.jstree .status-removedfromdraft > a .jstree-pageicon:before { background-color: #f7f7f7; -moz-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.3), inset 0 0 0 1px #455b6c; -webkit-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.3), inset 0 0 0 1px #455b6c; box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.3), inset 0 0 0 1px #455b6c; }
#cms-content-tools-CMSMain .cms-tree.jstree span.badge.status-removedfromdraft { -moz-box-shadow: 0px 0px 6px 2px #f7f7f7; -webkit-box-shadow: 0px 0px 6px 2px #f7f7f7; box-shadow: 0px 0px 6px 2px #f7f7f7; }
.jstree .status-workflow-approval > .jstree-hovered, .jstree .status-workflow-approval > .jstree-clicked, .cms-tree.jstree span.badge.status-workflow-approval { background-color: #E8FAFF; border-color: #0070B4; }
.cms-tree.jstree span.badge.status-workflow-approval { color: #0070B4; } .cms-tree.jstree span.badge.status-workflow-approval { color: #0070B4; }
.cms-tree.jstree .status-workflow-approval > a .jstree-pageicon:before { background-color: #0070B4; -moz-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.3), inset 0 0 0 1px #0070B4; -webkit-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.3), inset 0 0 0 1px #0070B4; box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.3), inset 0 0 0 1px #0070B4; }
#cms-content-tools-CMSMain .cms-tree.jstree span.badge.status-workflow-approval { -moz-box-shadow: 0px 0px 6px 2px #E8FAFF; -webkit-box-shadow: 0px 0px 6px 2px #E8FAFF; box-shadow: 0px 0px 6px 2px #E8FAFF; }
.cms-tree { visibility: hidden; } .cms-tree { visibility: hidden; }
.cms-tree.multiple li > a > .jstree-icon { display: none; } .cms-tree.multiple li > a > .jstree-icon { display: none; }
.cms-tree.multiple li > a > .jstree-icon.jstree-checkbox { display: inline-block; } .cms-tree.multiple li > a > .jstree-icon.jstree-checkbox { display: inline-block; }
@ -1335,7 +1358,7 @@ green tick icon as a background this is created using compass generated classes
@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2 / 1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) { /* Loading spinner */ @media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2 / 1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) { /* Loading spinner */
.cms-content-loading-spinner { background-image: url(../images/spinner@2x.gif); background-size: 43px 43px; } .cms-content-loading-spinner { background-image: url(../images/spinner@2x.gif); background-size: 43px 43px; }
.ui-dialog .ui-dialog-content.loading { background-image: url(../images/spinner@2x.gif); background-size: 43px 43px; } .ui-dialog .ui-dialog-content.loading { background-image: url(../images/spinner@2x.gif); background-size: 43px 43px; }
.ui-dialog.loading { background-image: url(../images/spinner@2x.gif); background-size: 43px 22px; } .ui-dialog.loading { background-image: url(../images/spinner@2x.gif); background-size: 43px 43px; }
/* Default CMS logo */ /* Default CMS logo */
.cms-logo a { background-image: url("../images/logo_small@2x.png"); background-size: 22px 22px; } .cms-logo a { background-image: url("../images/logo_small@2x.png"); background-size: 22px 22px; }
/* Logout button */ /* Logout button */

View File

@ -176,7 +176,7 @@
updateMenuFromResponse: function(xhr) { updateMenuFromResponse: function(xhr) {
var controller = xhr.getResponseHeader('X-Controller'); var controller = xhr.getResponseHeader('X-Controller');
if(controller) { if(controller) {
var item = this.find('li#Menu-' + controller); var item = this.find('li#Menu-' + controller.replace(/\\/g, '-').replace(/[^a-zA-Z0-9\-_:.]+/, ''));
if(!item.hasClass('current')) item.select(); if(!item.hasClass('current')) item.select();
} }
this.updateItems(); this.updateItems();

View File

@ -71,7 +71,7 @@
&.loading { &.loading {
background-image: url(../images/spinner@2x.gif); background-image: url(../images/spinner@2x.gif);
background-size: 43px 22px; background-size: 43px 43px;
} }
} }

View File

@ -64,8 +64,19 @@
height: 16px; height: 16px;
width: 12px; width: 12px;
&.jstree-checkbox { &.jstree-checkbox {
height: 19px; //Larger to help avoid accidental page loads when trying to click checkboxes
width: 16px; width: 16px;
position: relative;
//Larger to help avoid accidental page loads when trying to click checkboxes
&:before {
content: '';
display: block;
position: absolute;
z-index: 1;
left: -3px;
top: -3px;
height: 22px;
width: 25px;
}
} }
} }
} }
@ -592,6 +603,9 @@
.jstree-apple a .jstree-icon { .jstree-apple a .jstree-icon {
background-position:-60px -19px; background-position:-60px -19px;
} }
.jstree-apple a {
border-radius: 3px;
}
/** /**
* DEPRECATED: * DEPRECATED:
@ -602,10 +616,11 @@
*/ */
.cms-content-tools .cms-tree.jstree { .cms-content-tools .cms-tree.jstree {
li { li {
min-width: 159px; min-width: 187px;
} }
a { a {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis;
display: block; display: block;
position: relative; position: relative;
} }
@ -641,44 +656,52 @@ a .jstree-pageicon {
} }
} }
/* tree status icons and labels */ /* Tree status labels and dots */
.jstree-apple .jstree-clicked,
.jstree-apple .jstree-hovered {
background: #ebfbff;
}
%tree-status-icon-before { %tree-status-icon-before {
content:""; content:"";
display: block; display: block;
width:5px; width:6px;
height: 5px; height: 6px;
position: absolute; position: absolute;
bottom: 0; bottom: 0;
right: 0; right: 0;
background: #fce2d0; background: #fce2d0;
border: 1px solid #ff9344; border: 1px solid #fff;
border-radius: 100px; border-radius: 100px;
box-shadow: 0px 0px 0px 1px #fff;
} }
@mixin tree-status-icon($label, $color, $bgColor) { @mixin tree-status-icon($label, $dotColor, $textColor, $bgColor) {
.cms-tree.jstree .status-#{$label} > a .jstree-pageicon:before { .cms-tree.jstree .status-#{$label} > a .jstree-pageicon:before {
@extend %tree-status-icon-before; @extend %tree-status-icon-before;
} }
// Labels
.jstree .status-#{$label} > .jstree-hovered, .jstree .status-#{$label} > .jstree-hovered,
.jstree .status-#{$label} > .jstree-clicked, .jstree .status-#{$label} > .jstree-clicked,
.cms-tree.jstree span.badge.status-#{$label}, .cms-tree.jstree span.badge.status-#{$label} {
.cms-tree.jstree .status-#{$label} > a .jstree-pageicon:before {
background-color:$bgColor; background-color:$bgColor;
border-color:$color; border-color:$textColor;
}
#cms-content-tools-CMSMain .cms-tree.jstree span.badge.status-#{$label} {
box-shadow: 0px 0px 6px 2px $bgColor;
} }
.cms-tree.jstree span.badge.status-#{$label} { .cms-tree.jstree span.badge.status-#{$label} {
color: $color; color: $textColor;
}
// Dots
.cms-tree.jstree .status-#{$label} > a .jstree-pageicon:before {
background-color:$dotColor;
@include box-shadow(0px 1px 1px rgba(0, 0, 0, 0.3), inset 0 0 0 1px $textColor);
}
#cms-content-tools-CMSMain .cms-tree.jstree span.badge.status-#{$label} {
@include box-shadow(0px 0px 6px 2px $bgColor);
} }
} }
@include tree-status-icon('modified', #EE6214, #FFF4ED); @include tree-status-icon('addedtodraft', #ff7f22, #F46B00, #fff7f2);
@include tree-status-icon('addedtodraft', #EE6214, #FFF4ED); @include tree-status-icon('modified', #fff2e8, #F46B00, #fff7f2);
@include tree-status-icon('deletedonlive', #5F7688, #F5F5F5); @include tree-status-icon('archived', #5F7688, #455b6c, #f7f7f7);
@include tree-status-icon('archived', #5F7688, #F5F5F5); @include tree-status-icon('deletedonlive', #f7f7f7, #455b6c, #f7f7f7);
@include tree-status-icon('removedfromdraft', #5F7688, #F5F5F5); @include tree-status-icon('removedfromdraft', #f7f7f7, #455b6c, #f7f7f7);
@include tree-status-icon('workflow-approval', #0070B4, #E8FAFF); @include tree-status-icon('workflow-approval', #0070B4, #0070B4, #E8FAFF);
.cms-tree { .cms-tree {
visibility: hidden; // enabled by JS to avoid layout glitches visibility: hidden; // enabled by JS to avoid layout glitches

View File

@ -67,7 +67,7 @@ $color-good: #72c34b !default; // green
/*$color-optional: #a1d2eb !default; */ // orange /*$color-optional: #a1d2eb !default; */ // orange
$color-cms-batchactions-menu-background: #f5f5f5 !default; $color-cms-batchactions-menu-background: #f5f5f5 !default;
$color-cms-batchactions-menu-selected-background: #efe999 !default; $color-cms-batchactions-menu-selected-background: #fffcdc !default;
/** ----------------------------------------------- /** -----------------------------------------------
* Textures * Textures

View File

@ -17,10 +17,10 @@
], ],
"require": { "require": {
"php": ">=5.3.3", "php": ">=5.3.3",
"composer/installers": "*" "composer/installers": "~1.0"
}, },
"require-dev": { "require-dev": {
"phpunit/PHPUnit": "~3.7@stable" "phpunit/PHPUnit": "~3.7"
}, },
"extra": { "extra": {
"branch-alias": { "branch-alias": {
@ -29,6 +29,5 @@
}, },
"autoload": { "autoload": {
"classmap": ["tests/behat/features/bootstrap"] "classmap": ["tests/behat/features/bootstrap"]
}, }
"minimum-stability": "dev"
} }

View File

@ -272,7 +272,16 @@ class Injector {
* @return Injector Reference to restored active Injector instance * @return Injector Reference to restored active Injector instance
*/ */
public static function unnest() { public static function unnest() {
return self::set_inst(self::$instance->nestedFrom); if (self::inst()->nestedFrom) {
self::set_inst(self::inst()->nestedFrom);
}
else {
user_error(
"Unable to unnest root Injector, please make sure you don't have mis-matched nest/unnest",
E_USER_WARNING
);
}
return self::inst();
} }
/** /**

View File

@ -237,7 +237,16 @@ class Config {
* @return Config Reference to new active Config instance * @return Config Reference to new active Config instance
*/ */
public static function unnest() { public static function unnest() {
return self::set_instance(self::$instance->nestedFrom); if (self::inst()->nestedFrom) {
self::set_instance(self::inst()->nestedFrom);
}
else {
user_error(
"Unable to unnest root Config, please make sure you don't have mis-matched nest/unnest",
E_USER_WARNING
);
}
return self::inst();
} }
/** /**

View File

@ -185,9 +185,10 @@ if(!isset($_SERVER['HTTP_HOST'])) {
} }
} }
if (defined('SS_ALLOWED_HOSTS')) { // Filter by configured allowed hosts
if (defined('SS_ALLOWED_HOSTS') && php_sapi_name() !== "cli") {
$all_allowed_hosts = explode(',', SS_ALLOWED_HOSTS); $all_allowed_hosts = explode(',', SS_ALLOWED_HOSTS);
if (!in_array($_SERVER['HTTP_HOST'], $all_allowed_hosts)) { if (!isset($_SERVER['HTTP_HOST']) || !in_array($_SERVER['HTTP_HOST'], $all_allowed_hosts)) {
header('HTTP/1.1 400 Invalid Host', true, 400); header('HTTP/1.1 400 Invalid Host', true, 400);
die(); die();
} }

View File

@ -16,7 +16,7 @@ Used in side panels and action tabs
.backlink { padding-left: 12px; } .backlink { padding-left: 12px; }
body.cms.ss-uploadfield-edit-iframe, .composite.ss-assetuploadfield .details fieldset { overflow: auto; background: #E2E2E2; } body.cms.ss-uploadfield-edit-iframe, .composite.ss-assetuploadfield .details fieldset { overflow: auto; background: #E2E2E2; }
body.cms.ss-uploadfield-edit-iframe span.readonly, .composite.ss-assetuploadfield .details fieldset span.readonly { font-style: italic; color: #777777; text-shadow: 0px 1px 0px #fff; } body.cms.ss-uploadfield-edit-iframe span.readonly, .composite.ss-assetuploadfield .details fieldset span.readonly { font-style: italic; color: #9ba5ae; text-shadow: 0px 1px 0px #fff; }
body.cms.ss-uploadfield-edit-iframe .fieldholder-small label, .composite.ss-assetuploadfield .details fieldset .fieldholder-small label { margin-left: 0; } body.cms.ss-uploadfield-edit-iframe .fieldholder-small label, .composite.ss-assetuploadfield .details fieldset .fieldholder-small label { margin-left: 0; }
.composite.ss-assetuploadfield .details fieldset { padding: 16px; } .composite.ss-assetuploadfield .details fieldset { padding: 16px; }
@ -30,7 +30,7 @@ body.cms.ss-uploadfield-edit-iframe .fieldholder-small label, .composite.ss-asse
.ss-assetuploadfield .fileOverview .uploadStatus .state { float: left; font-size: 16px; font-weight: bold; line-height: 1.1em; } .ss-assetuploadfield .fileOverview .uploadStatus .state { float: left; font-size: 16px; font-weight: bold; line-height: 1.1em; }
.ss-assetuploadfield .fileOverview .uploadStatus .details { opacity: 0.9; float: right; } .ss-assetuploadfield .fileOverview .uploadStatus .details { opacity: 0.9; float: right; }
.ss-assetuploadfield .ss-uploadfield-item-actions.edit-all { clear: both; position: relative; z-index: 9; } .ss-assetuploadfield .ss-uploadfield-item-actions.edit-all { clear: both; position: relative; z-index: 9; }
.ss-assetuploadfield .ss-uploadfield-item-actions.edit-all .ss-uploadfield-item-edit-all { z-index: 8; position: absolute; top: -33px; padding: 0; background: none; border: 0; right: 0; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; color: #444; } .ss-assetuploadfield .ss-uploadfield-item-actions.edit-all .ss-uploadfield-item-edit-all { z-index: 8; position: absolute; top: -33px; padding: 0; background: none; border: 0; right: 0; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; color: #66727d; }
.ss-assetuploadfield .ss-uploadfield-item-actions.edit-all .ss-uploadfield-item-edit-all:hover { color: #1e7cba; } .ss-assetuploadfield .ss-uploadfield-item-actions.edit-all .ss-uploadfield-item-edit-all:hover { color: #1e7cba; }
.ss-assetuploadfield .ss-uploadfield-files { margin: 0; padding: 0; clear: both; } .ss-assetuploadfield .ss-uploadfield-files { margin: 0; padding: 0; clear: both; }
.ss-assetuploadfield .ss-uploadfield-files .ss-uploadfield-item { border: 1px solid #b3b3b3; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; -moz-background-clip: padding; -o-background-clip: padding-box; -webkit-background-clip: padding; background-clip: padding-box; margin: 0 0 5px; padding: 0; overflow: hidden; position: relative; } .ss-assetuploadfield .ss-uploadfield-files .ss-uploadfield-item { border: 1px solid #b3b3b3; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; -moz-background-clip: padding; -o-background-clip: padding-box; -webkit-background-clip: padding; background-clip: padding-box; margin: 0 0 5px; padding: 0; overflow: hidden; position: relative; }
@ -41,8 +41,8 @@ body.cms.ss-uploadfield-edit-iframe .fieldholder-small label, .composite.ss-asse
.ss-assetuploadfield .ss-uploadfield-files .ui-state-error .ss-uploadfield-item-info { background-color: #c11f1d; padding-right: 130px; background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJz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IiBzdG9wLWNvbG9yPSIjNzMxODE3Ii8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNncmFkKSIgLz48L3N2Zz4g'); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #c11f1d), color-stop(4%, #bf1d1b), color-stop(8%, #b71b1c), color-stop(15%, #b61e1d), color-stop(27%, #b11d1d), color-stop(31%, #ab1d1c), color-stop(42%, #a51b1b), color-stop(46%, #9f1b19), color-stop(50%, #9f1b19), color-stop(54%, #991c1a), color-stop(58%, #971a18), color-stop(62%, #911b1b), color-stop(65%, #911b1b), color-stop(88%, #7e1816), color-stop(92%, #771919), color-stop(100%, #731817)); background-image: -moz-linear-gradient(top, #c11f1d 0%, #bf1d1b 4%, #b71b1c 8%, #b61e1d 15%, #b11d1d 27%, #ab1d1c 31%, #a51b1b 42%, #9f1b19 46%, #9f1b19 50%, #991c1a 54%, #971a18 58%, #911b1b 62%, #911b1b 65%, #7e1816 88%, #771919 92%, #731817 100%); background-image: -webkit-linear-gradient(top, #c11f1d 0%, #bf1d1b 4%, #b71b1c 8%, #b61e1d 15%, #b11d1d 27%, #ab1d1c 31%, #a51b1b 42%, #9f1b19 46%, #9f1b19 50%, #991c1a 54%, #971a18 58%, #911b1b 62%, #911b1b 65%, #7e1816 88%, #771919 92%, #731817 100%); background-image: linear-gradient(to bottom, #c11f1d 0%, #bf1d1b 4%, #b71b1c 8%, #b61e1d 15%, #b11d1d 27%, #ab1d1c 31%, #a51b1b 42%, #9f1b19 46%, #9f1b19 50%, #991c1a 54%, #971a18 58%, #911b1b 62%, #911b1b 65%, #7e1816 88%, #771919 92%, #731817 100%); } .ss-assetuploadfield .ss-uploadfield-files .ui-state-error .ss-uploadfield-item-info { background-color: #c11f1d; padding-right: 130px; background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lv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NvbG9yPSIjNzcxOTE5Ii8+PHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjNzMxODE3Ii8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNncmFkKSIgLz48L3N2Zz4g'); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #c11f1d), color-stop(4%, #bf1d1b), color-stop(8%, #b71b1c), color-stop(15%, #b61e1d), color-stop(27%, #b11d1d), color-stop(31%, #ab1d1c), color-stop(42%, #a51b1b), color-stop(46%, #9f1b19), color-stop(50%, #9f1b19), color-stop(54%, #991c1a), color-stop(58%, #971a18), color-stop(62%, #911b1b), color-stop(65%, #911b1b), color-stop(88%, #7e1816), color-stop(92%, #771919), color-stop(100%, #731817)); background-image: -moz-linear-gradient(top, #c11f1d 0%, #bf1d1b 4%, #b71b1c 8%, #b61e1d 15%, #b11d1d 27%, #ab1d1c 31%, #a51b1b 42%, #9f1b19 46%, #9f1b19 50%, #991c1a 54%, #971a18 58%, #911b1b 62%, #911b1b 65%, #7e1816 88%, #771919 92%, #731817 100%); background-image: -webkit-linear-gradient(top, #c11f1d 0%, #bf1d1b 4%, #b71b1c 8%, #b61e1d 15%, #b11d1d 27%, #ab1d1c 31%, #a51b1b 42%, #9f1b19 46%, #9f1b19 50%, #991c1a 54%, #971a18 58%, #911b1b 62%, #911b1b 65%, #7e1816 88%, #771919 92%, #731817 100%); background-image: linear-gradient(to bottom, #c11f1d 0%, #bf1d1b 4%, #b71b1c 8%, #b61e1d 15%, #b11d1d 27%, #ab1d1c 31%, #a51b1b 42%, #9f1b19 46%, #9f1b19 50%, #991c1a 54%, #971a18 58%, #911b1b 62%, #911b1b 65%, #7e1816 88%, #771919 92%, #731817 100%); }
.ss-assetuploadfield .ss-uploadfield-files .ui-state-error .ss-uploadfield-item-info .ss-uploadfield-item-name { width: 100%; cursor: default; background: #bcb9b9; background: rgba(201, 198, 198, 0.9); } .ss-assetuploadfield .ss-uploadfield-files .ui-state-error .ss-uploadfield-item-info .ss-uploadfield-item-name { width: 100%; cursor: default; background: #bcb9b9; background: rgba(201, 198, 198, 0.9); }
.ss-assetuploadfield .ss-uploadfield-files .ui-state-error .ss-uploadfield-item-info .ss-uploadfield-item-name .name { text-shadow: 0px 1px 0px rgba(255, 255, 255, 0.7); } .ss-assetuploadfield .ss-uploadfield-files .ui-state-error .ss-uploadfield-item-info .ss-uploadfield-item-name .name { text-shadow: 0px 1px 0px rgba(255, 255, 255, 0.7); }
.ss-assetuploadfield .ss-uploadfield-files .ui-state-warning .ss-uploadfield-item-info { background-color: #E9D104; background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2U1ZDMzYiIvPjxzdG9wIG9mZnNldD0iOCUiIHN0b3AtY29sb3I9IiNlMmNlMjQiLz48c3RvcCBvZmZzZXQ9IjUwJSIgc3RvcC1jb2xvcj0iI2QxYmUxYyIvPjxzdG9wIG9mZnNldD0iNTQlIiBzdG9wLWNvbG9yPSIjZDFiZDFjIi8+PHN0b3Agb2Zmc2V0PSI5NiUiIHN0b3AtY29sb3I9IiNkMDlhMWEiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNjZjg3MWEiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI2dyYWQpIiAvPjwvc3ZnPiA='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #e5d33b), color-stop(8%, #e2ce24), color-stop(50%, #d1be1c), color-stop(54%, #d1bd1c), color-stop(96%, #d09a1a), color-stop(100%, #cf871a)); background-image: -moz-linear-gradient(top, #e5d33b 0%, #e2ce24 8%, #d1be1c 50%, #d1bd1c 54%, #d09a1a 96%, #cf871a 100%); background-image: -webkit-linear-gradient(top, #e5d33b 0%, #e2ce24 8%, #d1be1c 50%, #d1bd1c 54%, #d09a1a 96%, #cf871a 100%); background-image: linear-gradient(to bottom, #e5d33b 0%, #e2ce24 8%, #d1be1c 50%, #d1bd1c 54%, #d09a1a 96%, #cf871a 100%); } .ss-assetuploadfield .ss-uploadfield-files .ui-state-warning .ss-uploadfield-item-info { background-color: #E9D104; background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2U1ZDMzYiIvPjxzdG9wIG9mZnNldD0iOCUiIHN0b3AtY29sb3I9IiNlMmNlMjQiLz48c3RvcCBvZmZzZXQ9IjUwJSIgc3RvcC1jb2xvcj0iI2QxYmUxYyIvPjxzdG9wIG9mZnNldD0iNTQlIiBzdG9wLWNvbG9yPSIjZDFiYzFiIi8+PHN0b3Agb2Zmc2V0PSI5NiUiIHN0b3AtY29sb3I9IiNkMDlhMWEiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNjZTg3MTkiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI2dyYWQpIiAvPjwvc3ZnPiA='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #e5d33b), color-stop(8%, #e2ce24), color-stop(50%, #d1be1c), color-stop(54%, #d1bc1b), color-stop(96%, #d09a1a), color-stop(100%, #ce8719)); background-image: -moz-linear-gradient(top, #e5d33b 0%, #e2ce24 8%, #d1be1c 50%, #d1bc1b 54%, #d09a1a 96%, #ce8719 100%); background-image: -webkit-linear-gradient(top, #e5d33b 0%, #e2ce24 8%, #d1be1c 50%, #d1bc1b 54%, #d09a1a 96%, #ce8719 100%); background-image: linear-gradient(to bottom, #e5d33b 0%, #e2ce24 8%, #d1be1c 50%, #d1bc1b 54%, #d09a1a 96%, #ce8719 100%); }
.ss-assetuploadfield .ss-uploadfield-files .ss-uploadfield-item-name { position: relative; z-index: 1; margin: 3px 0 3px 50px; width: 50%; color: #5e5e5e; background: #eeeded; background: rgba(255, 255, 255, 0.8); -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; line-height: 24px; height: 22px; padding: 0 5px; text-align: left; cursor: pointer; display: table; table-layout: fixed; } .ss-assetuploadfield .ss-uploadfield-files .ss-uploadfield-item-name { position: relative; z-index: 1; margin: 3px 0 3px 50px; width: 50%; color: #7f8c97; background: #eeeded; background: rgba(255, 255, 255, 0.8); -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; line-height: 24px; height: 22px; padding: 0 5px; text-align: left; cursor: pointer; display: table; table-layout: fixed; }
.ss-assetuploadfield .ss-uploadfield-files .ss-uploadfield-item-name .name { text-shadow: 0px 1px 0px rgba(255, 255, 255, 0.5); display: inline; float: left; max-width: 50%; font-weight: normal; padding: 0 5px 0 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; -o-text-overflow: ellipsis; } .ss-assetuploadfield .ss-uploadfield-files .ss-uploadfield-item-name .name { text-shadow: 0px 1px 0px rgba(255, 255, 255, 0.5); display: inline; float: left; max-width: 50%; font-weight: normal; padding: 0 5px 0 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; -o-text-overflow: ellipsis; }
.ss-assetuploadfield .ss-uploadfield-files .ss-uploadfield-item-name .ss-uploadfield-item-status { position: relative; float: right; padding: 0 0 0 5px; max-width: 30%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; -o-text-overflow: ellipsis; text-shadow: 0px 1px 0px rgba(255, 255, 255, 0.5); } .ss-assetuploadfield .ss-uploadfield-files .ss-uploadfield-item-name .ss-uploadfield-item-status { position: relative; float: right; padding: 0 0 0 5px; max-width: 30%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; -o-text-overflow: ellipsis; text-shadow: 0px 1px 0px rgba(255, 255, 255, 0.5); }
.ss-assetuploadfield .ss-uploadfield-files .ss-uploadfield-item-name .ss-uploadfield-item-status.ui-state-error-text { text-shadow: 0px 1px 0px rgba(255, 255, 255, 0.6); color: #cc0000; } .ss-assetuploadfield .ss-uploadfield-files .ss-uploadfield-item-name .ss-uploadfield-item-status.ui-state-error-text { text-shadow: 0px 1px 0px rgba(255, 255, 255, 0.6); color: #cc0000; }
@ -78,7 +78,7 @@ body.cms.ss-uploadfield-edit-iframe .fieldholder-small label, .composite.ss-asse
.ss-insert-media .ss-assetuploadfield .ss-uploadfield-addfile .ss-uploadfield-item-uploador { font-size: 18px; margin-top: -5px; } .ss-insert-media .ss-assetuploadfield .ss-uploadfield-addfile .ss-uploadfield-item-uploador { font-size: 18px; margin-top: -5px; }
.ss-assetuploadfield .ss-uploadfield-addfile .ss-uploadfield-dropzone { margin-top: 9px; padding: 8px 0; -moz-border-radius: 13px; -webkit-border-radius: 13px; border-radius: 13px; -moz-box-shadow: rgba(128, 128, 128, 0.4) 0 0 4px 0 inset, 0 1px 0 #FAFAFA; -webkit-box-shadow: rgba(128, 128, 128, 0.4) 0 0 4px 0 inset, 0 1px 0 #FAFAFA; box-shadow: rgba(128, 128, 128, 0.4) 0 0 4px 0 inset, 0 1px 0 #FAFAFA; border: 2px dashed #808080; background: #d4dbe0; display: none; height: 54px; min-width: 280px; float: left; text-align: center; } .ss-assetuploadfield .ss-uploadfield-addfile .ss-uploadfield-dropzone { margin-top: 9px; padding: 8px 0; -moz-border-radius: 13px; -webkit-border-radius: 13px; border-radius: 13px; -moz-box-shadow: rgba(128, 128, 128, 0.4) 0 0 4px 0 inset, 0 1px 0 #FAFAFA; -webkit-box-shadow: rgba(128, 128, 128, 0.4) 0 0 4px 0 inset, 0 1px 0 #FAFAFA; box-shadow: rgba(128, 128, 128, 0.4) 0 0 4px 0 inset, 0 1px 0 #FAFAFA; border: 2px dashed #808080; background: #d4dbe0; display: none; height: 54px; min-width: 280px; float: left; text-align: center; }
.ss-assetuploadfield .ss-uploadfield-addfile .ss-uploadfield-dropzone.active.hover { -moz-box-shadow: rgba(255, 255, 255, 0.6) 0 0 3px 2px inset; -webkit-box-shadow: rgba(255, 255, 255, 0.6) 0 0 3px 2px inset; box-shadow: rgba(255, 255, 255, 0.6) 0 0 3px 2px inset; } .ss-assetuploadfield .ss-uploadfield-addfile .ss-uploadfield-dropzone.active.hover { -moz-box-shadow: rgba(255, 255, 255, 0.6) 0 0 3px 2px inset; -webkit-box-shadow: rgba(255, 255, 255, 0.6) 0 0 3px 2px inset; box-shadow: rgba(255, 255, 255, 0.6) 0 0 3px 2px inset; }
.ss-assetuploadfield .ss-uploadfield-addfile .ss-uploadfield-dropzone div { color: #5e5e5e; text-shadow: 0px 1px 0px #fff; background: url("../images/upload.png") 0 10px no-repeat; z-index: 1; padding: 6px 48px 0; line-height: 25px; font-size: 20px; font-weight: bold; display: inline-block; } .ss-assetuploadfield .ss-uploadfield-addfile .ss-uploadfield-dropzone div { color: #7f8c97; text-shadow: 0px 1px 0px #fff; background: url("../images/upload.png") 0 10px no-repeat; z-index: 1; padding: 6px 48px 0; line-height: 25px; font-size: 20px; font-weight: bold; display: inline-block; }
.ss-assetuploadfield .ss-uploadfield-addfile .ss-uploadfield-dropzone div span { display: block; font-size: 12px; z-index: -1; margin-top: -3px; } .ss-assetuploadfield .ss-uploadfield-addfile .ss-uploadfield-dropzone div span { display: block; font-size: 12px; z-index: -1; margin-top: -3px; }
.ss-insert-media .ss-assetuploadfield .ss-uploadfield-addfile .ss-uploadfield-dropzone { height: 54px; min-width: 250px; overflow: hidden; padding: 0; margin-top: 2px; } .ss-insert-media .ss-assetuploadfield .ss-uploadfield-addfile .ss-uploadfield-dropzone { height: 54px; min-width: 250px; overflow: hidden; padding: 0; margin-top: 2px; }
.ss-insert-media .ss-assetuploadfield .ss-uploadfield-addfile .ss-uploadfield-dropzone div { background-position: 0 11px; padding-top: 21px; margin-left: 33px; } .ss-insert-media .ss-assetuploadfield .ss-uploadfield-addfile .ss-uploadfield-dropzone div { background-position: 0 11px; padding-top: 21px; margin-left: 33px; }

View File

@ -1,7 +1,7 @@
{ {
"version": 3, "version": 3,
"mappings": ";;;;;;;;;;;;AASA,uCAAwC,GACvC,WAAW,EAAC,GAAG,EACf,KAAK,EAAC,IAAI,EACV,SAAS,EAAC,KAAK,EACf,OAAO,EAAC,KAAK;AAEb,+CAAQ,GACP,UAAU,EAAE,MAAM,EAClB,SAAS,ECgEM,IAAI;;AD5DrB,SAAU,GACT,YAAY,EAAE,IAAI;;AAGnB,qFAAoC,GACnC,QAAQ,EAAE,IAAI,EACd,UAAU,EAAE,OAAO;AAEnB,iHAAc,GACb,UAAU,EAAC,MAAM,EACjB,KAAK,EAAC,OAAyB,EAC/B,WAAW,EAAE,gBAAgB;AAI7B,uIAAK,GACJ,WAAW,EAAC,CAAC;;AAKhB,gDAAiD,GAEhD,OAAO,EAAE,IAAS;;AAGnB,oBAAqB,GACpB,aAA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eAAe,EAAE,SAAS",
"sources": ["../scss/AssetUploadField.scss","../admin/scss/themes/_default.scss","../../../../lib/gems/1.9.1/gems/compass-core-1.0.3/stylesheets/compass/_support.scss","../../../../lib/gems/1.9.1/gems/compass-core-1.0.3/stylesheets/compass/css3/_box-shadow.scss","../admin/scss/_mixins.scss","../../../../lib/gems/1.9.1/gems/compass-core-1.0.3/stylesheets/compass/css3/_border-radius.scss","../../../../lib/gems/1.9.1/gems/compass-core-1.0.3/stylesheets/compass/css3/_background-clip.scss","../../../../lib/gems/1.9.1/gems/compass-core-1.0.3/stylesheets/compass/css3/_images.scss","../scss/_elementMixins.scss","../../../../lib/gems/1.9.1/gems/compass-core-1.0.3/stylesheets/compass/css3/_text-shadow.scss"], "sources": ["../scss/AssetUploadField.scss","../admin/scss/themes/_default.scss","../../../../usr/local/share/gems/gems/compass-core-1.0.3/stylesheets/compass/_support.scss","../../../../usr/local/share/gems/gems/compass-core-1.0.3/stylesheets/compass/css3/_box-shadow.scss","../admin/scss/_mixins.scss","../../../../usr/local/share/gems/gems/compass-core-1.0.3/stylesheets/compass/css3/_border-radius.scss","../../../../usr/local/share/gems/gems/compass-core-1.0.3/stylesheets/compass/css3/_background-clip.scss","../../../../usr/local/share/gems/gems/compass-core-1.0.3/stylesheets/compass/css3/_images.scss","../scss/_elementMixins.scss","../../../../usr/local/share/gems/gems/compass-core-1.0.3/stylesheets/compass/css3/_text-shadow.scss"],
"names": [], "names": [],
"file": "AssetUploadField.css" "file": "AssetUploadField.css"
} }

View File

@ -1,7 +1,7 @@
{ {
"version": 3, "version": 3,
"mappings": ";;;;;;;;;;;;;AAwCE,wBAAQ,GACP,aAAa,EAAE,IAAY;AAC3B,8CAAuB,GACtB,aAAa,EAAE,CAAC;AAChB,sDAAQ,GACR,aAAa,EAXL,IAAI;AAcb,sDAA+B,GAC9B,aAAa,EAAE,CAAC;AAChB,8DAAQ,GACR,aAAa,EAjBL,IAAI;AAoBb,qDAA8B,GAC7B,aAAa,EAAE,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AM,EAAC,MAAM,EACb,OAAO,EAAC,MAAM,EACd,KAAK,EAAC,IAAI;AACV,+EAAK,GACJ,WAAW,EAAC,OAAO;AAEpB,oGAA4B,GOtjB7B,UAAY,EAAE,8DAAO;APyjBpB,gGAAwB,GOzjBzB,UAAY,EAAE,8DAAO;AP4jBpB,iGAAyB,GO5jB1B,UAAY,EAAE,4DAAO;AP+jBpB,gGAAwB,GO/jBzB,UAAY,EAAE,8DAAO;APkkBpB,+FAAsB,GACrB,OAAO,EAAC,EAAE;AAIb,yEAA2B,GAC1B,KAAK,EAAC,KAAK,EACX,OAAO,EAAC,KAAK,EACb,KAAK,EC5mBQ,KAAK,ECMtB,WAAW,EANG,6BAAwB;AFknBrC,wCAAU,GACT,aAAa,EAAE,MAAM;AAGvB,4CAAc,GACb,WAAW,EAAE,4BAA2B;AAEzC,2CAAa,GACZ,YAAY,EAAE,4BAA2B",
"sources": ["../scss/GridField.scss","../admin/scss/themes/_default.scss","../../../../lib/gems/1.9.1/gems/compass-core-1.0.3/stylesheets/compass/css3/_text-shadow.scss","../../../../lib/gems/1.9.1/gems/compass-core-1.0.3/stylesheets/compass/css3/_inline-block.scss","../admin/scss/_mixins.scss","../../../../lib/gems/1.9.1/gems/compass-core-1.0.3/stylesheets/compass/_support.scss","../../../../lib/gems/1.9.1/gems/compass-core-1.0.3/stylesheets/compass/css3/_border-radius.scss","../../../../lib/gems/1.9.1/gems/compass-core-1.0.3/stylesheets/compass/css3/_images.scss","../scss/_elementMixins.scss"], "sources": ["../scss/GridField.scss","../admin/scss/themes/_default.scss","../../../../usr/local/share/gems/gems/compass-core-1.0.3/stylesheets/compass/css3/_text-shadow.scss","../../../../usr/local/share/gems/gems/compass-core-1.0.3/stylesheets/compass/css3/_inline-block.scss","../admin/scss/_mixins.scss","../../../../usr/local/share/gems/gems/compass-core-1.0.3/stylesheets/compass/_support.scss","../../../../usr/local/share/gems/gems/compass-core-1.0.3/stylesheets/compass/css3/_border-radius.scss","../../../../usr/local/share/gems/gems/compass-core-1.0.3/stylesheets/compass/css3/_images.scss","../scss/_elementMixins.scss"],
"names": [], "names": [],
"file": "GridField.css" "file": "GridField.css"
} }

View File

@ -12,14 +12,14 @@ Used in side panels and action tabs
*/ */
.ss-uploadfield .clear { clear: both; } .ss-uploadfield .clear { clear: both; }
.ss-uploadfield .description { margin-left: 0; } .ss-uploadfield .description { margin-left: 0; }
.ss-uploadfield .middleColumn { min-width: 510px; max-width: 600px; width: 100%; margin-left: 0; clear: both; padding: 0; background: #fff; border: 1px solid #b3b3b3; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2VmZWZlZiIvPjxzdG9wIG9mZnNldD0iMTAlIiBzdG9wLWNvbG9yPSIjZmZmZmZmIi8+PHN0b3Agb2Zmc2V0PSI5MCUiIHN0b3AtY29sb3I9IiNmZmZmZmYiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNlZmVmZWYiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI2dyYWQpIiAvPjwvc3ZnPiA='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #efefef), color-stop(10%, #ffffff), color-stop(90%, #ffffff), color-stop(100%, #efefef)); background-image: -moz-linear-gradient(#efefef, #ffffff 10%, #ffffff 90%, #efefef); background-image: -webkit-linear-gradient(#efefef, #ffffff 10%, #ffffff 90%, #efefef); background-image: linear-gradient(#efefef, #ffffff 10%, #ffffff 90%, #efefef); } .ss-uploadfield .middleColumn { min-width: 510px; max-width: 696px; width: 100%; margin-left: 0; clear: both; padding: 0; background: #fff; border: 1px solid #b3b3b3; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2VmZWZlZiIvPjxzdG9wIG9mZnNldD0iMTAlIiBzdG9wLWNvbG9yPSIjZmZmZmZmIi8+PHN0b3Agb2Zmc2V0PSI5MCUiIHN0b3AtY29sb3I9IiNmZmZmZmYiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNlZmVmZWYiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI2dyYWQpIiAvPjwvc3ZnPiA='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #efefef), color-stop(10%, #ffffff), color-stop(90%, #ffffff), color-stop(100%, #efefef)); background-image: -moz-linear-gradient(#efefef, #ffffff 10%, #ffffff 90%, #efefef); background-image: -webkit-linear-gradient(#efefef, #ffffff 10%, #ffffff 90%, #efefef); background-image: linear-gradient(#efefef, #ffffff 10%, #ffffff 90%, #efefef); }
.ss-uploadfield .ss-uploadfield-item { margin: 0; padding: 15px; overflow: auto; } .ss-uploadfield .ss-uploadfield-item { margin: 0; padding: 15px; overflow: auto; }
.ss-uploadfield .ss-uploadfield-item .ss-uploadfield-item-preview { height: 60px; line-height: 60px; width: 80px; text-align: center; font-weight: bold; float: left; overflow: hidden; } .ss-uploadfield .ss-uploadfield-item .ss-uploadfield-item-preview { height: 60px; line-height: 60px; width: 80px; text-align: center; font-weight: bold; float: left; overflow: hidden; }
.ss-uploadfield .ss-uploadfield-item .ss-uploadfield-item-preview.ss-uploadfield-dropzone { -moz-box-shadow: #808080 0 0 4px 0 inset; -webkit-box-shadow: #808080 0 0 4px 0 inset; box-shadow: #808080 0 0 4px 0 inset; border: 2px dashed #808080; background: #d0d3d5; display: none; margin-right: 15px; } .ss-uploadfield .ss-uploadfield-item .ss-uploadfield-item-preview.ss-uploadfield-dropzone { -moz-box-shadow: #808080 0 0 4px 0 inset; -webkit-box-shadow: #808080 0 0 4px 0 inset; box-shadow: #808080 0 0 4px 0 inset; border: 2px dashed #808080; background: #D2D5D8; display: none; margin-right: 15px; }
.ss-uploadfield .ss-uploadfield-item .ss-uploadfield-item-info { margin-left: 95px; } .ss-uploadfield .ss-uploadfield-item .ss-uploadfield-item-info { margin-left: 95px; }
.ss-uploadfield .ss-uploadfield-item .ss-uploadfield-item-info .ss-uploadfield-item-name { display: block; line-height: 13px; height: 26px; margin: 0; text-align: left; } .ss-uploadfield .ss-uploadfield-item .ss-uploadfield-item-info .ss-uploadfield-item-name { display: block; line-height: 13px; height: 26px; margin: 0; text-align: left; }
.ss-uploadfield .ss-uploadfield-item .ss-uploadfield-item-info .ss-uploadfield-item-name .name { max-width: 240px; font-weight: bold; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; -o-text-overflow: ellipsis; display: inline; float: left; } .ss-uploadfield .ss-uploadfield-item .ss-uploadfield-item-info .ss-uploadfield-item-name .name { max-width: 240px; font-weight: bold; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; -o-text-overflow: ellipsis; display: inline; float: left; }
.ss-uploadfield .ss-uploadfield-item .ss-uploadfield-item-info .ss-uploadfield-item-name .size { color: #848484; padding: 0 0 0 5px; display: inline; float: left; } .ss-uploadfield .ss-uploadfield-item .ss-uploadfield-item-info .ss-uploadfield-item-name .size { color: #a9b2b9; padding: 0 0 0 5px; display: inline; float: left; }
.ss-uploadfield .ss-uploadfield-item .ss-uploadfield-item-info .ss-uploadfield-item-name .ss-uploadfield-item-status { float: right; padding: 0 0 0 5px; text-align: right; max-width: 75%; } .ss-uploadfield .ss-uploadfield-item .ss-uploadfield-item-info .ss-uploadfield-item-name .ss-uploadfield-item-status { float: right; padding: 0 0 0 5px; text-align: right; max-width: 75%; }
.ss-uploadfield .ss-uploadfield-item .ss-uploadfield-item-info .ss-uploadfield-item-name .ss-uploadfield-item-status.ui-state-error-text { color: #f00; font-weight: bold; width: 150px; } .ss-uploadfield .ss-uploadfield-item .ss-uploadfield-item-info .ss-uploadfield-item-name .ss-uploadfield-item-status.ui-state-error-text { color: #f00; font-weight: bold; width: 150px; }
.ss-uploadfield .ss-uploadfield-item .ss-uploadfield-item-info .ss-uploadfield-item-name .ss-uploadfield-item-status.ui-state-warning-text { color: #b7a403; } .ss-uploadfield .ss-uploadfield-item .ss-uploadfield-item-info .ss-uploadfield-item-name .ss-uploadfield-item-status.ui-state-warning-text { color: #b7a403; }
@ -34,7 +34,7 @@ Used in side panels and action tabs
.ss-uploadfield .ss-ui-button { display: block; float: left; margin: 0 10px 6px 0; } .ss-uploadfield .ss-ui-button { display: block; float: left; margin: 0 10px 6px 0; }
.ss-uploadfield .ss-ui-button.ss-uploadfield-fromcomputer { position: relative; overflow: hidden; } .ss-uploadfield .ss-ui-button.ss-uploadfield-fromcomputer { position: relative; overflow: hidden; }
.ss-uploadfield .ss-uploadfield-files { margin: 0; padding: 0; overflow: auto; position: relative; } .ss-uploadfield .ss-uploadfield-files { margin: 0; padding: 0; overflow: auto; position: relative; }
.ss-uploadfield .ss-uploadfield-files .ss-uploadfield-item, .ss-uploadfield .ss-uploadfield-files .ss-uploadfield-item.ui-state-error { border: 0; border-bottom: 1px solid #b3b3b3; background: none; color: #444; } .ss-uploadfield .ss-uploadfield-files .ss-uploadfield-item, .ss-uploadfield .ss-uploadfield-files .ss-uploadfield-item.ui-state-error { border: 0; border-bottom: 1px solid #b3b3b3; background: none; color: #66727d; }
.ss-uploadfield .ss-uploadfield-files .ss-uploadfield-item:last-child, .ss-uploadfield .ss-uploadfield-files .ss-uploadfield-item.ui-state-error:last-child { border-bottom: 0; } .ss-uploadfield .ss-uploadfield-files .ss-uploadfield-item:last-child, .ss-uploadfield .ss-uploadfield-files .ss-uploadfield-item.ui-state-error:last-child { border-bottom: 0; }
.ss-uploadfield .ss-uploadfield-files .ss-uploadfield-item-actions { min-height: 28px; overflow: hidden; margin: 6px 0 -6px 0; position: relative; } .ss-uploadfield .ss-uploadfield-files .ss-uploadfield-item-actions { min-height: 28px; overflow: hidden; margin: 6px 0 -6px 0; position: relative; }
.ss-uploadfield .ss-uploadfield-files .ss-uploadfield-item-progress { position: absolute; left: 0; right: 42px; width: auto; margin: 11px 0 0; height: 15px; } .ss-uploadfield .ss-uploadfield-files .ss-uploadfield-item-progress { position: absolute; left: 0; right: 42px; width: auto; margin: 11px 0 0; height: 15px; }
@ -49,7 +49,7 @@ Used in side panels and action tabs
.ss-uploadfield .ss-uploadfield-files .ss-uploadfield-item-editform { /* don't use display none, for it will break jQuery('iframe').contents().height() */ height: 0; overflow: hidden; clear: both; } .ss-uploadfield .ss-uploadfield-files .ss-uploadfield-item-editform { /* don't use display none, for it will break jQuery('iframe').contents().height() */ height: 0; overflow: hidden; clear: both; }
.ss-uploadfield .ss-uploadfield-files .ss-uploadfield-item-editform.loading { width: 100%; height: 22px; margin: 15px 0 0; background: url(../admin/images/spinner.gif) no-repeat 50% 0; } .ss-uploadfield .ss-uploadfield-files .ss-uploadfield-item-editform.loading { width: 100%; height: 22px; margin: 15px 0 0; background: url(../admin/images/spinner.gif) no-repeat 50% 0; }
.ss-uploadfield .ss-uploadfield-files .ss-uploadfield-item-editform.loading iframe { /* Old IE needs this or it'll give the iframe a white background, covering the spinner */ padding-top: 0; margin-top: 22px; border: none; } .ss-uploadfield .ss-uploadfield-files .ss-uploadfield-item-editform.loading iframe { /* Old IE needs this or it'll give the iframe a white background, covering the spinner */ padding-top: 0; margin-top: 22px; border: none; }
.ss-uploadfield .ss-uploadfield-files .ss-uploadfield-item-editform iframe { margin-top: 8px; padding-top: 8px; border-top: 1px solid #d0d3d5; width: 100%; } .ss-uploadfield .ss-uploadfield-files .ss-uploadfield-item-editform iframe { margin-top: 8px; padding-top: 8px; border-top: 1px solid #D2D5D8; width: 100%; }
.ss-uploadfield .ss-uploadfield-addfile.borderTop { border-top: 1px solid #b3b3b3; } .ss-uploadfield .ss-uploadfield-addfile.borderTop { border-top: 1px solid #b3b3b3; }
.ss-upload .clear { clear: both; } .ss-upload .clear { clear: both; }

View File

@ -1,7 +1,7 @@
{ {
"version": 3, "version": 3,
"mappings": ";;;;;;;;;;;;AAQC,sBAAO,GACN,KAAK,EAAE,IAAI;AAGZ,4BAAa,GACZ,WAAW,EAAE,CAAC;AAGf,6BAAc,GAGb,SAAS,EAAE,KAAK,EAChB,SAAS,EAAE,KAAK,EAChB,KAAK,EAAC,IAAI,EACV,WAAW,EAAC,CAAC,EACb,KAAK,EAAC,IAAI,EACV,OAAO,EAAE,CAAC,EACV,UAAU,EAAE,IAAI,EAChB,MAAM,EAAE,iBAA+C,ECkUvD,kBAAwC,EDjUjB,GAAG,ECiU1B,qBAAwC,EC9Sb,GAAuB,ED8SlD,aAAwC,EDjUjB,GAAG,EG6CtB,gBAAY,EAAE,ioBAAgC,EA2B9C,eAAe,EAAE,IAAI,EA3BrB,gBAAY,EAAE,kJAAgC,EAA9C,gBAAY,EAAE,gEAAgC,EA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AAE,8DAA8D;;;AAQ5E,gSAMyD,GAKrD,2EAAU,GACT,gBAAgB,EAAE,mCAAmC,EACrD,eAAe,EAAE,SAAS;EAO7B,kBAAQ,GACP,gBAAgB,EAAE,mCAAmC,EACrD,eAAe,EAAE,SAAS",
"sources": ["../scss/UploadField.scss","../../../../lib/gems/1.9.1/gems/compass-core-1.0.3/stylesheets/compass/_support.scss","../../../../lib/gems/1.9.1/gems/compass-core-1.0.3/stylesheets/compass/css3/_border-radius.scss","../../../../lib/gems/1.9.1/gems/compass-core-1.0.3/stylesheets/compass/css3/_images.scss","../../../../lib/gems/1.9.1/gems/compass-core-1.0.3/stylesheets/compass/css3/_box-shadow.scss","../admin/scss/themes/_default.scss","../admin/scss/_mixins.scss"], "sources": ["../scss/UploadField.scss","../../../../usr/local/share/gems/gems/compass-core-1.0.3/stylesheets/compass/_support.scss","../../../../usr/local/share/gems/gems/compass-core-1.0.3/stylesheets/compass/css3/_border-radius.scss","../../../../usr/local/share/gems/gems/compass-core-1.0.3/stylesheets/compass/css3/_images.scss","../../../../usr/local/share/gems/gems/compass-core-1.0.3/stylesheets/compass/css3/_box-shadow.scss","../admin/scss/themes/_default.scss","../admin/scss/_mixins.scss"],
"names": [], "names": [],
"file": "UploadField.css" "file": "UploadField.css"
} }

View File

@ -524,7 +524,8 @@ function exceptionHandler($exception) {
$file = $exception->getFile(); $file = $exception->getFile();
$line = $exception->getLine(); $line = $exception->getLine();
$context = $exception->getTrace(); $context = $exception->getTrace();
return Debug::fatalHandler($errno, $message, $file, $line, $context); Debug::fatalHandler($errno, $message, $file, $line, $context);
exit(1);
} }
/** /**
@ -558,6 +559,7 @@ function errorHandler($errno, $errstr, $errfile, $errline) {
case E_CORE_ERROR: case E_CORE_ERROR:
case E_USER_ERROR: case E_USER_ERROR:
default: default:
return Debug::fatalHandler($errno, $errstr, $errfile, $errline, debug_backtrace()); Debug::fatalHandler($errno, $errstr, $errfile, $errline, debug_backtrace());
exit(1);
} }
} }

View File

@ -9,8 +9,8 @@ lets you install and upgrade SilverStripe and its modules. Although installing
Other ways to get SilverStripe: Other ways to get SilverStripe:
* If you just want to get the code as quickly as possible, you can [download SilverStripe from our website](http://silverstripe.org/download). * If you just want to get the code as quickly as possible, you can [download SilverStripe from our website](http://www.silverstripe.org/software/download/).
* If you already have an installed version of SilverStripe, and you haven't used Composer to get it, please see our [upgrading](upgrading) guide. Note that [Composer](composer) provides its own tools for upgrading. * If you already have an installed version of SilverStripe, and you haven't used Composer to get it, please see our [upgrading](/upgrading) guide. Note that [Composer](composer) provides its own tools for upgrading.
## Setting up a server ## Setting up a server
@ -18,25 +18,25 @@ Other ways to get SilverStripe:
To run SilverStripe on Linux/Unix, set up one of the following web servers: To run SilverStripe on Linux/Unix, set up one of the following web servers:
* [Install using Apache](webserver) - our preferred platform * [Install using Apache](installation) - our preferred platform
* [Install using Lighttpd](lighttpd) - fast, but a bit tricker to get going * [Install using Lighttpd](installation/how_to/configure_lighttpd) - fast, but a bit trickier to get going
* [Install using Nginx](nginx) - Super fast at serving static files. Great for large traffic sites. * [Install using Nginx](installation/how_to/configure_nginx) - Super fast at serving static files. Great for large traffic sites.
* [Install using nginx and HHVM](nginx-hhvm) - nginx and [HHVM](http://hhvm.com/) as a faster alternative to PHP * [Install using nginx and HHVM](installation/how_to/setup_nginx_and_hhvm) - nginx and [HHVM](http://hhvm.com/) as a faster alternative to PHP.
### Windows ### Windows
The most straightforward way to get SilverStripe running on Windows is with the [Microsoft Web Platform installer](windows-pi). You can skip the "getting the code" step. The most straightforward way to get SilverStripe running on Windows is with the [Microsoft Web Platform installer](installation/other_installation_options/windows_platform_installer). You can skip the "getting the code" step.
For more flexibility, you can set up either of the following web servers, and use Composer to get the code: For more flexibility, you can set up either of the following web servers, and use Composer to get the code:
* [Install using IIS](windows-manual-iis) * [Install using IIS](installation/other_installation_options/windows_iis7)
* [Install using Apache/WAMP](windows-wamp) * [Install using Apache/WAMP](installation/windows)
### Mac OS X ### Mac OS X
Mac OS X comes with a built-in webserver, but there are a number of other options: Mac OS X comes with a built-in webserver, but there are a number of other options:
* [Install using MAMP](mac-osx) * [Install using MAMP](installation/mac_osx)
* [Install using Homebrew](installation/other_installation_options/mac_osx_homebrew) * [Install using Homebrew](installation/other_installation_options/mac_osx_homebrew)
### Virtual Machines through Vagrant ### Virtual Machines through Vagrant
@ -61,10 +61,9 @@ ready for download or installation on a cloud platform.
## Troubleshooting ## Troubleshooting
If you run into trouble, see [common-problems](common-problems) or post to the If you run into trouble, see [common-problems](installation/common_problems) or post to the
[SilverStripe forums](http://silverstripe.com/silverstripe-forum/). [SilverStripe forums](http://silverstripe.org/community/forums/).
## Related ## Related
* [Module installation](../topics/modules) * [Module installation](/developer_guides/extending/modules)
* [Suggested web hosts](http://doc.silverstripe.org/old/suggested-web-hosts)

View File

@ -27,6 +27,7 @@ These include video screencasts, written tutorials and code examples to get you
* [Lesson 15: Building a Search Form](http://www.silverstripe.org/learn/lessons/building-a-search-form) * [Lesson 15: Building a Search Form](http://www.silverstripe.org/learn/lessons/building-a-search-form)
* [Lesson 16: Lists and Pagination](http://www.silverstripe.org/learn/lessons/lists-and-pagination) * [Lesson 16: Lists and Pagination](http://www.silverstripe.org/learn/lessons/lists-and-pagination)
* [Lesson 17: Ajax Behaviour and Viewable Data](http://www.silverstripe.org/learn/lessons/ajax-behaviour-and-viewabledata) * [Lesson 17: Ajax Behaviour and Viewable Data](http://www.silverstripe.org/learn/lessons/ajax-behaviour-and-viewabledata)
* [Lesson 18: Dealing with Arbitrary Template Data](http://www.silverstripe.org/learn/lessons/dealing-with-arbitrary-template-data)
## Help: If you get stuck ## Help: If you get stuck

View File

@ -80,7 +80,7 @@ does, such as `ArrayData` or `ArrayList`.
'Name' => 'John', 'Name' => 'John',
'Role' => 'Head Coach', 'Role' => 'Head Coach',
'Experience' => $experience 'Experience' => $experience
))->renderWith("AjaxTemplate"); )))->renderWith("AjaxTemplate");
} else { } else {
return $this->httpError(404); return $this->httpError(404);
} }

View File

@ -56,7 +56,7 @@ First we need to define a callback for the shortcode.
'MyShortCodeMethod' => 'HTMLText' 'MyShortCodeMethod' => 'HTMLText'
); );
public function MyShortCodeMethod($arguments, $content = null, $parser = null, $tagName) { public static function MyShortCodeMethod($arguments, $content = null, $parser = null, $tagName) {
return "<em>" . $tagName . "</em> " . $content . "; " . count($arguments) . " arguments."; return "<em>" . $tagName . "</em> " . $content . "; " . count($arguments) . " arguments.";
} }
} }

View File

@ -117,14 +117,16 @@ To use this backend, you need a memcached daemon and the memcache PECL extension
'primary_memcached', 'primary_memcached',
'Memcached', 'Memcached',
array( array(
'host' => 'localhost', 'servers' => array(
'port' => 11211, 'host' => 'localhost',
'persistent' => true, 'port' => 11211,
'weight' => 1, 'persistent' => true,
'timeout' => 5, 'weight' => 1,
'retry_interval' => 15, 'timeout' => 5,
'status' => true, 'retry_interval' => 15,
'failure_callback' => '' 'status' => true,
'failure_callback' => ''
)
) )
); );
SS_Cache::pick_backend('primary_memcached', 'any', 10); SS_Cache::pick_backend('primary_memcached', 'any', 10);

View File

@ -1,6 +1,6 @@
# How to customize the CMS Menu # How to customize the CMS Menu
## Adding a administration panel ## Adding an administration panel
Every time you add a new extension of the `[api:LeftAndMain]` class to the CMS, Every time you add a new extension of the `[api:LeftAndMain]` class to the CMS,
SilverStripe will automatically create a new `[api:CMSMenuItem]` for it SilverStripe will automatically create a new `[api:CMSMenuItem]` for it

View File

@ -40,7 +40,7 @@ Never update a website on the live server without trying it on a development cop
How easy will it be to update my project? It's a fair question, and sometimes a difficult one to answer. How easy will it be to update my project? It's a fair question, and sometimes a difficult one to answer.
* "Micro" releases (x.y.z) are explicitly backwards compatible, "minor" and "major" releases can deprecate features and change APIs (see our [/misc/release-process](release process) for details) * "Micro" releases (x.y.z) are explicitly backwards compatible, "minor" and "major" releases can deprecate features and change APIs (see our [/misc/release-process](../contributing/release_process) for details)
* If you've made custom branches of SilverStripe core, or any thirdparty module, it's going to be harder to upgrade. * If you've made custom branches of SilverStripe core, or any thirdparty module, it's going to be harder to upgrade.
* The more custom features you have, the harder it will be to upgrade. You will have to re-test all of those features, and adapt to API changes in core. * The more custom features you have, the harder it will be to upgrade. You will have to re-test all of those features, and adapt to API changes in core.
* Customizations of a well defined type - such as custom page types or custom blog widgets - are going to be easier to upgrade than customisations that modify deep system internals like rewriting SQL queries. * Customizations of a well defined type - such as custom page types or custom blog widgets - are going to be easier to upgrade than customisations that modify deep system internals like rewriting SQL queries.

View File

@ -49,7 +49,7 @@
Use `set*()` and `add*()` methods instead. Use `set*()` and `add*()` methods instead.
* Template `<% control $MyList %>` syntax removed. Use `<% loop $MyList %>` instead. * Template `<% control $MyList %>` syntax removed. Use `<% loop $MyList %>` instead.
* Removed `Member.LastVisited` and `Member.NumVisits` properties, see * Removed `Member.LastVisited` and `Member.NumVisits` properties, see
[Howto: Track Member Logins](/extending/how_tos/track_member_logins) to restore functionality as custom code [Howto: Track Member Logins](/developer_guides/extending/how_tos/track_member_logins) to restore functionality as custom code
## New and changed API ## New and changed API

View File

@ -1,6 +1,9 @@
title: Contributing Code
summary: Fix bugs and add new features to help make SilverStripe better.
# Contributing Code - Submiting Bugfixes and Enhancements # Contributing Code - Submiting Bugfixes and Enhancements
SilverStripe will never be finished, and we need your help to keep making it better. If you're a developer a great way to get involved is to contribute patches to our modules and core codebase, fixing bugs or adding feautres. SilverStripe will never be finished, and we need your help to keep making it better. If you're a developer a great way to get involved is to contribute patches to our modules and core codebase, fixing bugs or adding features.
The SilverStripe core modules (`framework` and `cms`), as well as some of the more popular modules are in The SilverStripe core modules (`framework` and `cms`), as well as some of the more popular modules are in
git version control. SilverStripe hosts its modules on [github.com/silverstripe](http://github.com/silverstripe) and [github.com/silverstripe-labs](http://github.com/silverstripe-labs). After [installing git](http://help.github.com/git-installation-redirect) and creating a [free github.com account](https://github.com/signup/free), you can "fork" a module, git version control. SilverStripe hosts its modules on [github.com/silverstripe](http://github.com/silverstripe) and [github.com/silverstripe-labs](http://github.com/silverstripe-labs). After [installing git](http://help.github.com/git-installation-redirect) and creating a [free github.com account](https://github.com/signup/free), you can "fork" a module,
@ -16,7 +19,9 @@ We ask for this so that the ownership in the license is clear and unambiguous, a
## Step-by-step: From forking to sending the pull request ## Step-by-step: From forking to sending the pull request
_**NOTE:** The commands on this page assume that you are targetting framework version 3.2 <div class="notice" markdown='1'>
**Note:** Please adjust the commands below to the version of SilverStripe that you're targeting.
</div>
1. Install the project through composer. The process is described in detail in "[Installation through Composer](../getting_started/composer#contributing)". 1. Install the project through composer. The process is described in detail in "[Installation through Composer](../getting_started/composer#contributing)".
@ -50,18 +55,18 @@ _**NOTE:** The commands on this page assume that you are targetting framework ve
# [make sure all your changes are committed as necessary in branch] # [make sure all your changes are committed as necessary in branch]
git fetch upstream git fetch upstream
git rebase upstream/3.1 git rebase upstream/3.2
6. When development is complete, [squash all commit related to a single issue into a single commit](code#squash-all-commits-related-to-a-single-issue-into-a-single-commit). 6. When development is complete, [squash all commit related to a single issue into a single commit](code#squash-all-commits-related-to-a-single-issue-into-a-single-commit).
git fetch upstream git fetch upstream
git rebase -i upstream/3.1 git rebase -i upstream/3.2
7. Push release candidate branch to GitHub 7. Push release candidate branch to GitHub
git push origin ###-description git push origin ###-description
8. Issue pull request on GitHub. Visit your forked respoistory on GitHub.com and click the "Create Pull Request" button nex tot the new branch. 8. Issue pull request on GitHub. Visit your forked repository on GitHub.com and click the "Create Pull Request" button next to the new branch.
The core team is then responsible for reviewing patches and deciding if they will make it into core. If The core team is then responsible for reviewing patches and deciding if they will make it into core. If
there are any problems they will follow up with you, so please ensure they have a way to contact you! there are any problems they will follow up with you, so please ensure they have a way to contact you!
@ -79,11 +84,11 @@ A core committer will also "label" your PR using the labels defined in GitHub, t
The current GitHub labels are grouped into 5 sections: The current GitHub labels are grouped into 5 sections:
1. Changes - These are designed to signal what kind of change they are and how they fit into the [Semantic Versioning](http://semver.org/) schema 1. *Changes* - These are designed to signal what kind of change they are and how they fit into the [Semantic Versioning](http://semver.org/) schema
2. Impact - What impact does this bug/issue/fix have, does it break a feature completely, is it just a side effect or is it trivial and not a bit problem (but a bit annoying) 2. *Impact* - What impact does this bug/issue/fix have, does it break a feature completely, is it just a side effect or is it trivial and not a bit problem (but a bit annoying)
3. Effort - How much effort is required to fix this issue? 3. *Effort* - How much effort is required to fix this issue?
4. Type - What aspect of the system the PR/issue covers 4. *Type* - What aspect of the system the PR/issue covers
5. Feedback - Are we waiting on feedback, if so who from? Typically used for issues that are likely to take a while to have feedback given 5. *Feedback* - Are we waiting on feedback, if so who from? Typically used for issues that are likely to take a while to have feedback given
| Label | Purpose | | Label | Purpose |
| ----- | ------- | | ----- | ------- |
@ -102,9 +107,9 @@ The current GitHub labels are grouped into 5 sections:
| feedback-required/core-team | Core team members need to give an in-depth consideration | | feedback-required/core-team | Core team members need to give an in-depth consideration |
| feedback-required/author | This issue is awaiting feedback from the original author of the PR | | feedback-required/author | This issue is awaiting feedback from the original author of the PR |
### Workflow Diagram ### ### Workflow Diagram
![Workflow diagram](http://www.silverstripe.org/assets/doc-silverstripe-org/collaboration-on-github.png) [![Workflow diagram](http://www.silverstripe.org/assets/doc-silverstripe-org/collaboration-on-github.png)](http://www.silverstripe.org/assets/doc-silverstripe-org/collaboration-on-github.png)
### Quickfire Do's and Don't's ### Quickfire Do's and Don't's
@ -112,18 +117,18 @@ If you aren't familiar with git and GitHub, try reading the ["GitHub bootcamp do
We also found the [free online git book](http://git-scm.com/book/) and the [git crash course](http://gitref.org/) useful. We also found the [free online git book](http://git-scm.com/book/) and the [git crash course](http://gitref.org/) useful.
If you're familiar with it, here's the short version of what you need to know. Once you fork and download the code: If you're familiar with it, here's the short version of what you need to know. Once you fork and download the code:
* **Don't develop on the master branch.** Always create a development branch specific to "the issue" you're working on (on our [GitHub repository's issues](https://github.com/silverstripe/silverstripe-framework/issues)). Name it by issue number and description. For example, if you're working on Issue #100, a `DataObject::get_one()` bugfix, your development branch should be called 100-dataobject-get-one. If you decide to work on another issue mid-stream, create a new branch for that issue--don't work on both in one branch. * **Don't develop on the master branch.** Always create a development branch specific to "the issue" you're working on (on our [GitHub repository's issues](https://github.com/silverstripe/silverstripe-framework/issues)). Name it by issue number and description. For example, if you're working on Issue #100, a `DataObject::get_one()` bugfix, your development branch should be called 100-dataobject-get-one. If you decide to work on another issue mid-stream, create a new branch for that issue--don't work on both in one branch.
* **Do not merge the upstream master** with your development branch; *rebase* your branch on top of the upstream master. * **Do not merge the upstream master** with your development branch; *rebase* your branch on top of the upstream master.
* **A single development branch should represent changes related to a single issue.** If you decide to work on another issue, create another branch. * **A single development branch should represent changes related to a single issue.** If you decide to work on another issue, create another branch.
* **Squash your commits, so that each commit addresses a single issue.** After you rebase your work on top of the upstream master, you can squash multiple commits into one. Say, for instance, you've got three commits in related to Issue #100. Squash all three into one with the message "Issue #100 Description of the issue here." We won't accept pull requests for multiple commits related to a single issue; it's up to you to squash and clean your commit tree. (Remember, if you squash commits you've already pushed to GitHub, you won't be able to push that same branch again. Create a new local branch, squash, and push the new squashed branch.) * **Squash your commits, so that each commit addresses a single issue.** After you rebase your work on top of the upstream master, you can squash multiple commits into one. Say, for instance, you've got three commits in related to Issue #100. Squash all three into one with the message "Description of the issue here (fixes #100)" We won't accept pull requests for multiple commits related to a single issue; it's up to you to squash and clean your commit tree. (Remember, if you squash commits you've already pushed to GitHub, you won't be able to push that same branch again. Create a new local branch, squash, and push the new squashed branch.)
* **Choose the correct branch**: Assume the current release is 3.0.3, and 3.1.0 is in beta state. * **Choose the correct branch**: Assume the current release is 3.0.3, and 3.1.0 is in beta state.
Most pull requests should go against the `3.1.x-dev` *pre-release branch*, only critical bugfixes Most pull requests should go against the `3.1.x-dev` *pre-release branch*, only critical bugfixes
against the `3.0.x-dev` *release branch*. If you're changing an API or introducing a major feature, against the `3.0.x-dev` *release branch*. If you're changing an API or introducing a major feature,
the pull request should go against `master` (read more about our [release process](release_process)). Branches are periodically merged "upwards" (3.0 into 3.1, 3.1 into master). the pull request should go against `master` (read more about our [release process](release_process)). Branches are periodically merged "upwards" (3.0 into 3.1, 3.1 into master).
### Editing files directly on GitHub.com ### Editing files directly on GitHub.com
@ -133,21 +138,20 @@ After you have edited the file, GitHub will offer to create a pull request for y
## Check List ## Check List
* Adhere to our [coding conventions](/getting_started/coding_conventions) * Adhere to our [coding conventions](/getting_started/coding_conventions)
* If your patch is extensive, discuss it first on the [silverstripe-dev google group](https://groups.google.com/group/silverstripe-dev) (ideally before doing any serious coding) * If your patch is extensive, discuss it first on the [silverstripe-dev google group](https://groups.google.com/group/silverstripe-dev) (ideally before doing any serious coding)
* When working on existing tickets, provide status updates through ticket comments * When working on existing tickets, provide status updates through ticket comments
* Check your patches against the "master" branch, as well as the latest release branch * Check your patches against the "master" branch, as well as the latest release branch
* Write [unit tests](../developer_guides/testing/unit_testing) * Write [unit tests](../developer_guides/testing/unit_testing)
* Write [Behat integration tests](https://github.com/silverstripe-labs/silverstripe-behat-extension) for any interface changes * Write [Behat integration tests](https://github.com/silverstripe-labs/silverstripe-behat-extension) for any interface changes
* Describe specifics on how to test the effects of the patch * Describe specifics on how to test the effects of the patch
* It's better to submit multiple patches with separate bits of functionality than a big patch containing lots of * It's better to submit multiple patches with separate bits of functionality than a big patch containing lots of changes
changes * Only submit a pull request for work you expect to be ready to merge. Work in progress is best discussed in an issue, or on your own repository fork.
* Only submit a pull request for work you expect to be ready to merge. Work in progress is best discussed in an issue, or on your own repository fork. * Document your code inline through [PHPDoc](http://en.wikipedia.org/wiki/PHPDoc) syntax. See our
* Document your code inline through [PHPDoc](http://en.wikipedia.org/wiki/PHPDoc) syntax. See our
[API documentation](http://api.silverstripe.org/3.1/) for good examples. [API documentation](http://api.silverstripe.org/3.1/) for good examples.
* Check and update documentation on [docs.silverstripe.org](http://docs.silverstripe.org). Check for any references to functionality deprecated or extended through your patch. Documentation changes should be included in the patch. * Check and update documentation on [docs.silverstripe.org](http://docs.silverstripe.org). Check for any references to functionality deprecated or extended through your patch. Documentation changes should be included in the patch.
* If you get stuck, please post to the [forum](http://silverstripe.org/forum) or for deeper core problems, to the [core mailinglist](https://groups.google.com/forum/#!forum/silverstripe-dev) * If you get stuck, please post to the [forum](http://silverstripe.org/forum) or for deeper core problems, to the [core mailinglist](https://groups.google.com/forum/#!forum/silverstripe-dev)
* When working with the CMS, please read the ["CMS Architecture Guide"](cms_architecture) first * When working with the CMS, please read the ["CMS Architecture Guide"](/developer_guides/customising_the_admin_interface/cms_architecture/) first
## Commit Messages ## Commit Messages
@ -159,10 +163,9 @@ This ensures commits are easy to browse, and look nice on github.com
As we automatically generate [changelogs](http://doc.silverstripe.org/sapphire/en/trunk/changelogs/) from them, we need a way to categorize and filter. As we automatically generate [changelogs](http://doc.silverstripe.org/sapphire/en/trunk/changelogs/) from them, we need a way to categorize and filter.
Please prefix **noteworthy** commit messages with one of the following tags: Please prefix **noteworthy** commit messages with one of the following tags:
* `NEW`: New feature or major enhancement (both for users and developers) * `NEW` New feature or major enhancement (both for users and developers)
* `API`: Addition of a new API, or modification/removal/deprecation of an existing API. * `API` Addition of a new API, or modification/removal/deprecation of an existing API. Includes any change developers should be aware of when upgrading.
Includes any change developers should be aware of when upgrading. * `BUG` Bugfix or minor enhancement on something developers or users are likely to encounter.
* `BUG`: Bugfix or minor enhancement on something developers or users are likely to encounter.
All other commits should not be tagged if they are so trivial that most developers All other commits should not be tagged if they are so trivial that most developers
can ignore them during upgrades or when reviewing changes to the codebase. can ignore them during upgrades or when reviewing changes to the codebase.
@ -195,16 +198,14 @@ Example: Good commit message
### Branch for new issue and develop on issue branch ### Branch for new issue and develop on issue branch
Before you start working on a new feature or bugfix, create a new branch dedicated to that one change named by issue number and description. If you're working on Issue #100, a retweet bugfix, create a new branch with the issue number and description, like this: Before you start working on a new feature or bugfix, create a new branch dedicated to that one change named by issue number and description. If you're working on Issue #100, a `DataObject::get_one()` bugfix, create a new branch with the issue number and description, like this:
$ git status $ git checkout -b 100-dataobject-get-one
$ git branch 100-dataobject-get-one
$ git checkout 100-dataobject-get-one
Edit and test the files on your development environment. When you've got something the way you want and established that it works, commit the changes to your branch on your local git repo. Edit and test the files on your development environment. When you've got something the way you want and established that it works, commit the changes to your branch on your local git repo.
$ git add <filename> $ git add <filename>
$ git commit -m 'Issue #100: Some kind of descriptive message' $ git commit -m 'Some kind of descriptive message (fixes #100)'
You'll need to use git add for each file that you created or modified. There are ways to add multiple files, but I highly recommend a more deliberate approach unless you know what you're doing. You'll need to use git add for each file that you created or modified. There are ways to add multiple files, but I highly recommend a more deliberate approach unless you know what you're doing.
@ -220,13 +221,13 @@ To keep your development branch up to date, rebase your changes on top of the cu
If you've set up an upstream branch as detailed above, and a development branch called `100-dataobject-get-one`, you can update `upstream` and rebase your branch from it like so: If you've set up an upstream branch as detailed above, and a development branch called `100-dataobject-get-one`, you can update `upstream` and rebase your branch from it like so:
# [make sure all your changes are committed as necessary in branch] # make sure all your changes are committed as necessary in branch
$ git fetch upstream $ git fetch upstream
$ git rebase upstream/master $ git rebase upstream/master
Note that the example doesn't keep your own master branch up to date. If you wanted to that, you might take the following approach instead: Note that the example doesn't keep your own master branch up to date. If you wanted to that, you might take the following approach instead:
# [make sure all your changes are committed as necessary in branch] # make sure all your changes are committed as necessary in branch
$ git fetch upstream $ git fetch upstream
$ git checkout master $ git checkout master
$ git rebase upstream/master $ git rebase upstream/master
@ -248,11 +249,15 @@ To squash four commits into one, do the following:
$ git rebase -i upstream/master $ git rebase -i upstream/master
In the text editor that comes up, replace the words "pick" with "squash" next to the commits you want to squash into the commit before it. Save and close the editor, and git will combine the "squash"'ed commits with the one before it. Git will then give you the opportunity to change your commit message to something like, "BUGFIX Issue #100: Fixed DataObject::get_one() parameter order" In the text editor that comes up, replace the words "pick" with "squash" or just "s" next to the commits you want to squash into the commit before it.
Save and close the editor, and git will combine the "squash"'ed commits with the one before it.
Git will then give you the opportunity to change your commit message to something like, `BUG DataObject::get_one() parameter order (fixes #100)`.
If you want to discard the commit messages from the commits you're squashing and just use the message from your "pick" commit(s) you can use "fixup" or "f" instead of "squash" to bypass the message editing and make the process a bit quicker.
Important: If you've already pushed commits to GitHub, and then squash them locally, you will have to force-push to your GitHub again. Add the `-f` argument to your git push command: Important: If you've already pushed commits to GitHub, and then squash them locally, you will have to force-push to your GitHub again. Add the `-f` argument to your git push command:
$ git push -f origin 100-dataobject-get-one $ git push -f origin 100-dataobject-get-one
Helpful hint: You can always edit your last commit message by using: Helpful hint: You can always edit your last commit message by using:
@ -274,21 +279,23 @@ Sometimes, you might correct an issue which was reported in a different repo. In
$ git commit -m 'Issue silverstripe/silverstripe-cms#100: Some kind of descriptive message' $ git commit -m 'Issue silverstripe/silverstripe-cms#100: Some kind of descriptive message'
Sometimes, you might correct an issue which was reported in a different repo. In these cases, don't simply refer to the issue number as GitHub will infer that as correcting an issue in the current repo. See [Commit Messages](code#commit-messages) above for the correct way to reference these issues.
## What is git rebase? ## What is git rebase?
Using `git rebase` helps create clean commit trees and makes keeping your code up-to-date with the current state of the upstream master easy. Here's how it works. Using `git rebase` helps create clean commit trees and makes keeping your code up-to-date with the current state of the upstream master easy. Here's how it works.
Let's say you're working on Issue #212 a new plugin in your own branch and you start with something like this: Let's say you're working on Issue #212 a new plugin in your own branch and you start with something like this:
1---2---3 #212-my-new-plugin 1---2---3 #212-my-new-plugin
/ /
A---B #master A---B #master
You keep coding for a few days and then pull the latest upstream stuff and you end up like this: You keep coding for a few days and then pull the latest upstream stuff and you end up like this:
1---2---3 #212-my-new-plugin 1---2---3 #212-my-new-plugin
/ /
A---B--C--D--E--F #master A---B--C--D--E--F #master
So all these new things (C,D,..F) have happened since you started. Normally you would just keep going (let's say you're not finished with the plugin yet) and then deal with a merge later on, which becomes a commit, which get moved upstream and ends up grafted on the tree forever. So all these new things (C,D,..F) have happened since you started. Normally you would just keep going (let's say you're not finished with the plugin yet) and then deal with a merge later on, which becomes a commit, which get moved upstream and ends up grafted on the tree forever.
@ -298,9 +305,9 @@ git rebase master 212-my-new-plugin
git will rewrite your commits like this: git will rewrite your commits like this:
1---2---3 #212-my-new-plugin 1---2---3 #212-my-new-plugin
/ /
A---B--C--D--E--F #master A---B--C--D--E--F #master
It's as if you had just started your branch. One immediate advantage you get is that you can test your branch now to see if C, D, E, or F had any impact on your code (you don't need to wait until you're finished with your plugin and merge to find this out). And, since you can keep doing this over and over again as you develop your plugin, at the end your merge will just be a fast-forward (in other words no merge at all). It's as if you had just started your branch. One immediate advantage you get is that you can test your branch now to see if C, D, E, or F had any impact on your code (you don't need to wait until you're finished with your plugin and merge to find this out). And, since you can keep doing this over and over again as you develop your plugin, at the end your merge will just be a fast-forward (in other words no merge at all).

View File

@ -3,30 +3,30 @@ summary: Writing guide for contributing to SilverStripe developer and CMS user h
# Contributing documentation # Contributing documentation
Documentation for a software project is a continued and collaborative effort. We encourage everybody to contribute in any way they can, from simply fixing spelling mistakes, to writing recipes, to reviewing existing documentation and translating it to another language. Documentation for a software project is a continuing, collaborative effort. We encourage everybody to contribute in any way they can, from simply fixing spelling mistakes, to writing recipes, reviewing existing documentation and translation to other languages.
Modifying documentation requires basic [PHPDoc](http://en.wikipedia.org/wiki/PHPDoc) and Modifying documentation requires basic knowledge of [PHPDoc](http://en.wikipedia.org/wiki/PHPDoc) and
[Markdown](http://daringfireball.net/projects/markdown/) knowledge, and a GitHub user account. [Markdown](http://daringfireball.net/projects/markdown/) as well as a GitHub user account.
## Editing online ## Editing online
The easiest way of editing any documentation is by clicking the "Edit this page" link at the bottom of the The easiest way of editing any documentation is by clicking the "Edit this page" button at the bottom of the
page you want to edit. Alternatively, locate the appropriate .md file in the page you want to edit. Alternatively, locate the appropriate .md file in the
[github.com/silverstripe/silverstripe-framework](https://github.com/silverstripe/silverstripe-framework/tree/master/docs/) repository and press the "edit" button. **You will need a free GitHub account to do this**. [github.com/silverstripe/silverstripe-framework](https://github.com/silverstripe/silverstripe-framework/tree/master/docs/) repository and press the "edit" button. **You will need a free GitHub account to do this**.
* After editing the documentation, describe your changes in the "commit summary" and "extended description" fields below then press "Commit Changes". * After editing the documentation, describe your changes in the "commit summary" and "extended description" fields below then press "Commit Changes".
* After that you will see a form to submit a Pull Request: "[pull requests](http://help.github.com/pull-requests/)". You should be able to adjust the version your documentation changes apply to and then submit the form. Your changes will be sent to the core committers for approval. * After committing you changes, you will see a form to submit a Pull Request: "[pull requests](http://help.github.com/pull-requests/)". You should be able to adjust the version to which your documentation changes apply before submitting the form. Any changes submitted in a pull request will be sent to the core committers for approval.
<div class="warning" markdown='1'> <div class="warning" markdown='1'>
You should make your changes in the lowest branch they apply to. For instance, if you fix a spelling issue that you found in the 3.1 documentation, submit your fix to that branch in Github and it'll be copied to the master (3.2) version of the documentation automatically. *Don't submit multiple pull requests*. You should make your changes in the lowest branch they apply to. For instance, if you fix a spelling issue that you found in the 3.2 documentation, submit your fix to that branch in Github and it'll be copied to the master (4.0) version of the documentation automatically. *Don't submit multiple pull requests*.
</div> </div>
## Editing on your computer ## Editing on your computer
If you prefer to edit content on your local machine, you can "[fork](http://help.github.com/forking/)" the If you prefer to edit content on your local machine, you can "[fork](http://help.github.com/forking/)" the
[github.com/silverstripe/silverstripe-framework](http://github.com/silverstripe/silverstripe-framework) and [github.com/silverstripe/silverstripe-framework](http://github.com/silverstripe/silverstripe-framework) and
[github.com/silverstripe/silverstripe-cms](http://github.com/silverstripe/silverstripe-cms) repositories, and send us "[pull requests](http://help.github.com/pull-requests/)" to incorporate your changes. If you have previously downloaded SilverStripe or a module, chances are that you already have these repositories on your machine. [github.com/silverstripe/silverstripe-cms](http://github.com/silverstripe/silverstripe-cms) repositories, make changes locally, and then send us a "[pull request](http://help.github.com/pull-requests/)" to incorporate your changes. If you have previously downloaded SilverStripe or a module, chances are that you already have these repositories on your machine.
The documentation is kept alongside the source code in the `docs/` subfolder of any SilverStripe module, framework or CMS folder. The documentation is kept alongside the source code in the `docs/` subfolder of any SilverStripe module, framework or CMS folder.
@ -36,8 +36,8 @@ If you submit a new feature or an API change, we strongly recommend that your pa
## Repositories ## Repositories
* End-user: [userhelp.silverstripe.org](http://github.com/silverstripe/userhelp.silverstripe.org) * End-user help: [userhelp.silverstripe.org](http://github.com/silverstripe/userhelp.silverstripe.org)
* Developer guides: [doc.silverstripe.org](http://github.com/silverstripe/doc.silverstripe.org) * Developer guides: [docs.silverstripe.org](http://github.com/silverstripe/docs.silverstripe.org)
* Developer API documentation: [api.silverstripe.org](http://github.com/silverstripe/api.silverstripe.org) * Developer API documentation: [api.silverstripe.org](http://github.com/silverstripe/api.silverstripe.org)
## Source control ## Source control
@ -51,7 +51,7 @@ for documenting open source software.
## Structure ## Structure
* Keep documentation lines to 120 characters. * Keep documentation lines shorter than 120 characters.
* Don't duplicate: Search for existing places to put your documentation. Do you really require a new page, or just a new paragraph of text somewhere? * Don't duplicate: Search for existing places to put your documentation. Do you really require a new page, or just a new paragraph of text somewhere?
* Use PHPDoc in source code: Leave low level technical documentation to code comments within PHP, in [PHPDoc](http://en.wikipedia.org/wiki/PHPDoc) format. * Use PHPDoc in source code: Leave low level technical documentation to code comments within PHP, in [PHPDoc](http://en.wikipedia.org/wiki/PHPDoc) format.
* API and developer guides are two forms of source code documentation that complement each other. * API and developer guides are two forms of source code documentation that complement each other.
@ -64,7 +64,7 @@ as "related content" on other resource (e.g. `/tutorials/site_search` might link
* Write in second person plural form: Use "we" instead of "I". It gives the text an instructive and collaborative style. * Write in second person plural form: Use "we" instead of "I". It gives the text an instructive and collaborative style.
* It's okay to address the reader: For example "First you'll install a webserver" is good style. * It's okay to address the reader: For example "First you'll install a webserver" is good style.
* Write in an active and direct voice. * Write in an active and direct voice.
* Mark up correctly: Use preformatted text. Emphasis and bold make technical writing more easily "scannable". * Mark up correctly: The use of preformatted text, emphasis and bold make technical writing easier to scan.
* Avoid FAQs: FAQs are not a replacement for coherent, well explained documentation. If you've done a good job * Avoid FAQs: FAQs are not a replacement for coherent, well explained documentation. If you've done a good job
documenting, there shouldn't be any "frequently asked questions" left. documenting, there shouldn't be any "frequently asked questions" left.
* "SilverStripe" should always appear without a space with both "S"s capitalised. * "SilverStripe" should always appear without a space with both "S"s capitalised.
@ -73,7 +73,7 @@ documenting, there shouldn't be any "frequently asked questions" left.
* We use sentence case for titles so only capitalise the first letter of the first word of a title. The only exceptions to this are when using brand names (e.g. SilverStripe), acronyms (e.g. PHP) and class names (e.g. ModelAdmin). * We use sentence case for titles so only capitalise the first letter of the first word of a title. The only exceptions to this are when using brand names (e.g. SilverStripe), acronyms (e.g. PHP) and class names (e.g. ModelAdmin).
* Use gender neutral language throughout the document, unless referencing a specific person. Use them, they, their, instead of he and she, his or her. * Use gender neutral language throughout the document, unless referencing a specific person. Use them, they, their, instead of he and she, his or her.
* URLs: if the end of your sentence is a URL then you don't need to use a full stop. * URLs: if the end of your sentence is a URL then you don't need to use a full stop.
* Bullet points: Sentence case your bullet points. If a bullet point is a full sentence then end with a full stop. If it is a short point or a list, full stops are not required. * Bullet points: Sentence case your bullet points. If a bullet point is a full sentence then end with a full stop. If it is a sentence fragment or a comma separated list, full stops are not required.
## Highlighted blocks ## Highlighted blocks
@ -117,7 +117,7 @@ on placing HTML blocks inside Markdown.
Documentation is kept alongside the source code, typically in a module subdirectory like `framework/docs/en/`. Each language has its own subfolder, which can duplicate parts of or the entire body of documentation. German documentation would, for example, live in `framework/docs/de/`. The Documentation is kept alongside the source code, typically in a module subdirectory like `framework/docs/en/`. Each language has its own subfolder, which can duplicate parts of or the entire body of documentation. German documentation would, for example, live in `framework/docs/de/`. The
[docsviewer](https://github.com/silverstripe/silverstripe-docsviewer) module that drives [docsviewer](https://github.com/silverstripe/silverstripe-docsviewer) module that drives
[doc.silverstripe.org](http://doc.silverstripe.org) automatically resolves these subfolders into a language dropdown. [docs.silverstripe.org](http://docs.silverstripe.org) automatically resolves these subfolders into a language dropdown.
## Further reading ## Further reading

View File

@ -10,39 +10,39 @@ Honour the code of conduct whenever you participate formally and informally in o
* Experiment with your code and share the results. * Experiment with your code and share the results.
* Ask questions if you get stuck. * Ask questions if you get stuck.
* If you can answer questions be responsive and help guide others towards solutions * If you can answer questions, be responsive and help guide others towards solutions.
* Share code and knowledge that might help others. * Share code and knowledge that might help others.
* The community is first and foremost about people sharing their knowledge to build something great together. * The community is first and foremost about people sharing their knowledge to build something great together.
## Be empathetic, friendly and considerate. ## Be empathetic, friendly and considerate.
* Welcome and encourage participation from everyone that wishes to join our community. * Welcome and encourage participation from everyone that wishes to join and contribute to our community.
* Remember growing the community socially is as important as code related matters. * Remember, growing the community socially is just as important as code related matters.
* Be respectful and honour diversity in our community. Sexist, racist, and other exclusionary jokes can offend those around you and are not appropriate. * Be respectful and honour diversity in our community. Sexist, racist, and other exclusionary jokes can offend those around you and are not appropriate.
* Keep your actions lawful, non-discriminatory, and unthreatening towards others. * Keep your actions lawful, non-discriminatory, and unthreatening towards others.
## Respect the readers time. ## Respect the readers time.
* Be concise and read over things before you post. * Be concise and read over things before you post.
* Mind your words, you write something once that will be read by many - being abusive, mean spirited and swearing at others does nothing to help get points across and drive constructive contributions to open source. * Mind your words; you write a single time but what you write will be read by many. Being abusive, mean spirited and swearing at others do nothing to help get your points across nor do they drive constructive collaboration and hence stimulate contributions to open source.
* Be clear when responding who you are representing, are you speaking on behalf of another business or acting in your capacity as an individual community member? Either is fine and encouraged and you should aim to make it clear to the reader. * Be clear about who you are representing when responding; are you speaking on behalf of another business or acting in your capacity as an individual community member? Either is fine and both are encouraged. Just make it clear to the reader.
## Respect different levels of participation. ## Respect different levels of participation.
* Welcome newcomers, spend a little time helping orientate them in our community. * Welcome newcomers. Spend some time helping them to get orientated in our community.
* All contributors and core committers, module maintainers and knowledge sharers are participating in the community in a voluntary nature. Have respect for them and their time when making requests. You may need to exercise some patience. * All contributors and core committers, module maintainers and knowledge sharers are participating in the community in a voluntary nature. Have respect for them and their time when making requests. You may need to exercise some patience.
* Whenever possible reference your comments to others with example code or links to documentation. This helps people learn and become more experienced community members and developers. * Whenever possible, reference your comments to others with example code or links to documentation. This helps people learn and become more experienced community members and developers.
* If you manage to solve your own problem, tell others how you solved it. This will help people in the future that find they have the same problem as you. * If you manage to solve your own problem, tell others how you solved it. This will help people in the future who have to solve similar problems.
* If you are reducing your input and potentially stepping away from the community please remember others might rely on your contributions. Be prepared to ensure these are kept open and available, spend some time handing over to another community member or core contributor to help continuity of SilverStripe open source. * If you are reducing your input, and potentially stepping away from the community, please remember that others might be relying on your contributions. Be prepared to ensure your contributions remain open and available to the community. Spend some time handing your contributions over to another community member or core contributor to help with the continuity of SilverStripe open source development.
## Resolve conflicts directly ## Resolve conflicts directly
* Conflict may eventuate from time to time, we should view it as a constructive process. Understanding others positions without descending into ad hominem attacks is valuable. * Conflict may eventuate from time to time. We should all try to view it as a constructive process. Understanding others' positions, without descending into ad hominem attacks, is valuable and may lead to better solutions to problems.
* Involve a 3rd party or if necessary inform a core committer if conflicts continue to escalate. * Involve a 3rd party. If necessary, inform a core committer if a conflict continues to escalate.
* Breaches of the code of conduct by community members may first result in a reminder about the code of conduct (we realise we're all human and sometimes we have bad days). * Breaches of the code of conduct by a community member may result in a first reminder about the code of conduct (we realise we're all human and sometimes we have bad days).
* Repeated and deliberate breaching after this will be referred to the core committers team and may result in members being asked to leave the community channels. * Repeated and deliberate breachings of the code of conduct following this first reminder will be referred on to the team of core committers and may result in the member being asked to leave the community channels.
* While we have a policy of not removing postings and comments from our digital channels, there may be times in which items are removed if deemed blatantly discriminatory towards individuals, groups or cultures. * While we have a policy of not removing postings and comments from our digital channels, there may be times in which items are removed if deemed blatantly discriminatory towards individuals, groups or cultures.
* Call others on their behaviour within the community and remind them of this code where necessary. * If a member behaves inappropriately, politely bring this to their attention and gently remind them of the code of conduct when necessary.
* Refer to [these helpful guides on conflict resolution](http://www.crnhq.org/pages.php?pID=10) to aid you. * Refer to [these helpful guides on conflict resolution](http://www.crnhq.org/pages.php?pID=10) to aid you when dealing with a conflict.
## A living document ## A living document
* This is a living document, as core committers we don't have all the answers and we attempt to make the community an innovative and valuable space for everyone that wishes to participate. * This is a living document. As core committers, we know we don't have all the answers so we want to make the community an innovative and valuable space for everyone that wishes to contribute.
* If you would like to improve the wording, add additional items, or simply fix typos, each contribution to the code of conduct will be considered on it's merit and agreed upon unanimously by the core committers. Any changes will be included in future revisions of the SilverStripe code of conduct. * If you would like to improve the wording, add additional items, or simply fix typos, each contribution to the code of conduct will be considered on it's merit and agreed upon unanimously by the core committers. Any changes will be included in future revisions of the SilverStripe code of conduct.

View File

@ -140,10 +140,10 @@ class File extends DataObject {
private static $app_categories = array( private static $app_categories = array(
'audio' => array( 'audio' => array(
"aif" ,"au" ,"mid" ,"midi" ,"mp3" ,"ra" ,"ram" ,"rm","mp3" ,"wav" ,"m4a" ,"snd" ,"aifc" ,"aiff" ,"wma", "aif" ,"au" ,"mid" ,"midi" ,"mp3" ,"ra" ,"ram" ,"rm","mp3" ,"wav" ,"m4a" ,"snd" ,"aifc" ,"aiff" ,"wma",
"apl", "avr" ,"cda" ,"mp4" ,"ogg" "apl", "avr" ,"cda" ,"ogg"
), ),
'mov' => array( 'mov' => array(
"mpeg" ,"mpg" ,"m1v" ,"mp2" ,"mpa" ,"mpe" ,"ifo" ,"vob","avi" ,"wmv" ,"asf" ,"m2v" ,"qt", "ogv", "webm" "mpeg" ,"mpg" ,"mp4" ,"m1v" ,"mp2" ,"mpa" ,"mpe" ,"ifo" ,"vob","avi" ,"wmv" ,"asf" ,"m2v" ,"qt", "ogv", "webm"
), ),
'zip' => array( 'zip' => array(
"arc" ,"rar" ,"tar" ,"gz" ,"tgz" ,"bz2" ,"dmg" ,"jar","ace" ,"arj" ,"bz" ,"cab" "arc" ,"rar" ,"tar" ,"gz" ,"tgz" ,"bz2" ,"dmg" ,"jar","ace" ,"arj" ,"bz" ,"cab"

View File

@ -3,20 +3,22 @@
/** /**
* Represents a field in a form. * Represents a field in a form.
* *
* A FieldList contains a number of FormField objects which make up the whole * A FieldList contains a number of FormField objects which make up the whole of a form.
* of a form. In addition to single fields, FormField objects can be
* "composite", for example, the {@link TabSet} field. Composite fields let us
* define complex forms without having to resort to custom HTML.
* *
* <b>Subclassing</b> * In addition to single fields, FormField objects can be "composite", for example, the
* {@link TabSet} field. Composite fields let us define complex forms without having to resort to
* custom HTML.
* *
* Define a {@link dataValue()} method that returns a value suitable for * To subclass:
* inserting into a single database field. For example, you might tidy up the *
* format of a date or currency field. Define {@link saveInto()} to totally * Define a {@link dataValue()} method that returns a value suitable for inserting into a single
* customise saving. For example, data might be saved to the filesystem instead * database field.
* of the data record, or saved to a component of the data record instead of *
* the data record itself. Define {@link validate()} to validate the form field * For example, you might tidy up the format of a date or currency field. Define {@link saveInto()}
* and ensure that the content provided is valid. * to totally customise saving.
*
* For example, data might be saved to the filesystem instead of the data record, or saved to a
* component of the data record instead of the data record itself.
* *
* @package forms * @package forms
* @subpackage core * @subpackage core
@ -28,16 +30,49 @@ class FormField extends RequestHandler {
*/ */
protected $form; protected $form;
protected $name, $title, $value ,$message, $messageType, $extraClass; /**
* @var string
*/
protected $name;
/** /**
* @var $description string Adds a "title"-attribute to the markup. * @var null|string
*/
protected $title;
/**
* @var mixed
*/
protected $value;
/**
* @var string
*/
protected $message;
/**
* @var string
*/
protected $messageType;
/**
* @var string
*/
protected $extraClass;
/**
* Adds a title attribute to the markup.
*
* @var string
*
* @todo Implement in all subclasses * @todo Implement in all subclasses
*/ */
protected $description; protected $description;
/** /**
* @var $extraClasses array Extra CSS-classes for the formfield-container * Extra CSS classes for the FormField container.
*
* @var array
*/ */
protected $extraClasses; protected $extraClasses;
@ -47,85 +82,111 @@ class FormField extends RequestHandler {
*/ */
private static $default_classes = array(); private static $default_classes = array();
/**
* @var bool
*/
public $dontEscape; public $dontEscape;
/** /**
* @var $rightTitle string Used in SmallFieldHolder to force a right-aligned label, or in FieldHolder * Right-aligned, contextual label for the field.
* to create contextual label. *
* @var string
*/ */
protected $rightTitle; protected $rightTitle;
/** /**
* @var $leftTitle string Used in SmallFieldHolder() to force a left-aligned label with correct spacing. * Left-aligned, contextual label for the field.
* Please use $title for FormFields rendered with FieldHolder(). *
* @var string
*/ */
protected $leftTitle; protected $leftTitle;
/** /**
* Stores a reference to the FieldList that contains this object. * Stores a reference to the FieldList that contains this object.
*
* @var FieldList * @var FieldList
*/ */
protected $containerFieldList; protected $containerFieldList;
/** /**
* @var boolean * @var bool
*/ */
protected $readonly = false; protected $readonly = false;
/** /**
* @var boolean * @var bool
*/ */
protected $disabled = false; protected $disabled = false;
/** /**
* @var string custom validation message for the Field * Custom validation message for the field.
*/
protected $customValidationMessage = "";
/**
* Name of the template used to render this form field. If not set, then
* will look up the class ancestry for the first matching template where
* the template name equals the class name.
*
* To explicitly use a custom template or one named other than the form
* field see {@link setTemplate()}, {@link setFieldHolderTemplate()}
* *
* @var string * @var string
*/ */
protected protected $customValidationMessage = '';
$template,
$fieldHolderTemplate,
$smallFieldHolderTemplate;
/** /**
* @var array All attributes on the form field (not the field holder). * Name of the template used to render this form field. If not set, then will look up the class
* Partially determined based on other instance properties, please use {@link getAttributes()}. * ancestry for the first matching template where the template name equals the class name.
*
* To explicitly use a custom template or one named other than the form field see
* {@link setTemplate()}.
*
* @var string
*/
protected $template;
/**
* Name of the template used to render this form field. If not set, then will look up the class
* ancestry for the first matching template where the template name equals the class name.
*
* To explicitly use a custom template or one named other than the form field see
* {@link setFieldHolderTemplate()}.
*
* @var string
*/
protected $fieldHolderTemplate;
/**
* @var string
*/
protected $smallFieldHolderTemplate;
/**
* All attributes on the form field (not the field holder).
*
* Partially determined based on other instance properties.
*
* @see getAttributes()
*
* @var array
*/ */
protected $attributes = array(); protected $attributes = array();
/** /**
* Takes a fieldname and converts camelcase to spaced * Takes a field name and converts camelcase to spaced words. Also resolves combined field
* words. Also resolves combined fieldnames with dot syntax * names with dot syntax to spaced words.
* to spaced words.
* *
* Examples: * Examples:
*
* - 'TotalAmount' will return 'Total Amount' * - 'TotalAmount' will return 'Total Amount'
* - 'Organisation.ZipCode' will return 'Organisation Zip Code' * - 'Organisation.ZipCode' will return 'Organisation Zip Code'
* *
* @param string $fieldName * @param string $fieldName
*
* @return string * @return string
*/ */
public static function name_to_label($fieldName) { public static function name_to_label($fieldName) {
if(strpos($fieldName, '.') !== false) { if(strpos($fieldName, '.') !== false) {
$parts = explode('.', $fieldName); $parts = explode('.', $fieldName);
$label = $parts[count($parts)-2] . ' ' . $parts[count($parts)-1];
$label = $parts[count($parts) - 2] . ' ' . $parts[count($parts) - 1];
} else { } else {
$label = $fieldName; $label = $fieldName;
} }
$label = preg_replace("/([a-z]+)([A-Z])/","$1 $2", $label); return preg_replace('/([a-z]+)([A-Z])/', '$1 $2', $label);
return $label;
} }
/** /**
@ -133,41 +194,51 @@ class FormField extends RequestHandler {
* *
* @param string $tag * @param string $tag
* @param array $attributes * @param array $attributes
* @param mixed $content * @param null|string $content
* *
* @return string * @return string
*/ */
public static function create_tag($tag, $attributes, $content = null) { public static function create_tag($tag, $attributes, $content = null) {
$preparedAttributes = ''; $preparedAttributes = '';
foreach($attributes as $k => $v) { foreach($attributes as $attributeKey => $attributeValue) {
// Note: as indicated by the $k == value item here; the decisions over what to include in the attributes if(!empty($attributeValue) || $attributeValue === '0' || ($attributeKey == 'value' && $attributeValue !== null)) {
// can sometimes get finicky $preparedAttributes .= sprintf(
if(!empty($v) || $v === '0' || ($k == 'value' && $v !== null) ) { ' %s="%s"', $attributeKey, Convert::raw2att($attributeValue)
$preparedAttributes .= " $k=\"" . Convert::raw2att($v) . "\""; );
} }
} }
if($content || $tag != 'input') { if($content || $tag != 'input') {
return "<$tag$preparedAttributes>$content</$tag>"; return sprintf(
} '<%s%s>%s</%s>', $tag, $preparedAttributes, $content, $tag
else { );
return "<$tag$preparedAttributes />";
} }
return sprintf(
'<%s%s />', $tag, $preparedAttributes
);
} }
/** /**
* Creates a new field. * Creates a new field.
* *
* @param string $name The internal field name, passed to forms. * @param string $name The internal field name, passed to forms.
* @param string $title The human-readable field label. * @param null|string $title The human-readable field label.
* @param mixed $value The value of the field. * @param mixed $value The value of the field.
*/ */
public function __construct($name, $title = null, $value = null) { public function __construct($name, $title = null, $value = null) {
$this->name = $name; $this->name = $name;
$this->title = ($title === null) ? self::name_to_label($name) : $title;
if($value !== NULL) $this->setValue($value); if($title === null) {
$this->title = self::name_to_label($name);
} else {
$this->title = $title;
}
if($value !== null) {
$this->setValue($value);
}
parent::__construct(); parent::__construct();
@ -175,7 +246,7 @@ class FormField extends RequestHandler {
} }
/** /**
* set up the default classes for the form. This is done on construct so that the default classes can be removed * Set up the default classes for the form. This is done on construct so that the default classes can be removed
* after instantiation * after instantiation
*/ */
protected function setupDefaultClasses() { protected function setupDefaultClasses() {
@ -199,10 +270,10 @@ class FormField extends RequestHandler {
} }
/** /**
* Returns the HTML ID of the field - used in the template by label tags. * Returns the HTML ID of the field.
* *
* The ID is generated as FormName_FieldName. All Field functions should ensure * The ID is generated as FormName_FieldName. All Field functions should ensure that this ID is
* that this ID is included in the field. * included in the field.
* *
* @return string * @return string
*/ */
@ -237,7 +308,7 @@ class FormField extends RequestHandler {
} }
/** /**
* Returns the raw field name. * Returns the field name.
* *
* @return string * @return string
*/ */
@ -257,10 +328,11 @@ class FormField extends RequestHandler {
} }
/** /**
* Returns the field message type, used by form validation. * Returns the field message type.
* *
* Arbitrary value which is mostly used for CSS classes in the rendered HTML, * Arbitrary value which is mostly used for CSS classes in the rendered HTML, e.g "required".
* e.g. "required". Use {@link setError()} to set this property. *
* Use {@link setError()} to set this property.
* *
* @return string * @return string
*/ */
@ -269,7 +341,9 @@ class FormField extends RequestHandler {
} }
/** /**
* Returns the field value - used by templates. * Returns the field value.
*
* @return mixed
*/ */
public function Value() { public function Value() {
return $this->value; return $this->value;
@ -289,8 +363,7 @@ class FormField extends RequestHandler {
} }
/** /**
* Returns the field value suitable for insertion into the * Returns the field value suitable for insertion into the data object.
* {@link DataObject}.
* *
* @return mixed * @return mixed
*/ */
@ -308,12 +381,13 @@ class FormField extends RequestHandler {
} }
/** /**
* @param string $val * @param string $title
* *
* @return FormField * @return $this
*/ */
public function setTitle($val) { public function setTitle($title) {
$this->title = $val; $this->title = $title;
return $this; return $this;
} }
@ -328,56 +402,78 @@ class FormField extends RequestHandler {
} }
/** /**
* Sets the contextual label. * @param string $rightTitle
* *
* @param $val string Text to set on the label. * @return $this
*/ */
public function setRightTitle($val) { public function setRightTitle($rightTitle) {
$this->rightTitle = $val; $this->rightTitle = $rightTitle;
return $this;
}
public function LeftTitle() {
return $this->leftTitle;
}
public function setLeftTitle($val) {
$this->leftTitle = $val;
return $this; return $this;
} }
/** /**
* Compiles all CSS-classes. Optionally includes a "nolabel"-class * @return string
* if no title was set on the formfield. */
* Uses {@link Message()} and {@link MessageType()} to add validatoin public function LeftTitle() {
* error classes which can be used to style the contained tags. return $this->leftTitle;
}
/**
* @param string $leftTitle
* *
* @return string CSS-classnames * @return $this
*/
public function setLeftTitle($leftTitle) {
$this->leftTitle = $leftTitle;
return $this;
}
/**
* Compiles all CSS-classes. Optionally includes a "nolabel" class if no title was set on the
* FormField.
*
* Uses {@link Message()} and {@link MessageType()} to add validation error classes which can
* be used to style the contained tags.
*
* @return string
*/ */
public function extraClass() { public function extraClass() {
$classes = array(); $classes = array();
$classes[] = $this->Type(); $classes[] = $this->Type();
if($this->extraClasses) $classes = array_merge($classes, array_values($this->extraClasses)); if($this->extraClasses) {
$classes = array_merge(
$classes,
array_values($this->extraClasses)
);
}
// Allow customization of label and field tag positioning if(!$this->Title()) {
if(!$this->Title()) $classes[] = "nolabel"; $classes[] = 'nolabel';
}
// Allow custom styling of any element in the container based // Allow custom styling of any element in the container based on validation errors,
// on validation errors, e.g. red borders on input tags. // e.g. red borders on input tags.
// CSS-Class needs to be different from the one rendered //
// through {@link FieldHolder()} // CSS class needs to be different from the one rendered through {@link FieldHolder()}.
if($this->Message()) $classes[] .= "holder-" . $this->MessageType(); if($this->Message()) {
$classes[] .= 'holder-' . $this->MessageType();
}
return implode(' ', $classes); return implode(' ', $classes);
} }
/** /**
* Add one or more CSS-classes to the formfield-container. Multiple class * Add one or more CSS-classes to the FormField container.
* names should be space delimited. *
* Multiple class names should be space delimited.
* *
* @param string $class * @param string $class
*
* @return $this
*/ */
public function addExtraClass($class) { public function addExtraClass($class) {
$classes = preg_split('/\s+/', $class); $classes = preg_split('/\s+/', $class);
@ -390,9 +486,11 @@ class FormField extends RequestHandler {
} }
/** /**
* Remove one or more CSS-classes from the formfield-container. * Remove one or more CSS-classes from the FormField container.
* *
* @param string $class * @param string $class
*
* @return $this
*/ */
public function removeExtraClass($class) { public function removeExtraClass($class) {
$classes = preg_split('/\s+/', $class); $classes = preg_split('/\s+/', $class);
@ -407,34 +505,43 @@ class FormField extends RequestHandler {
/** /**
* Set an HTML attribute on the field element, mostly an <input> tag. * Set an HTML attribute on the field element, mostly an <input> tag.
* *
* Some attributes are best set through more specialized methods, to avoid interfering with built-in behaviour: * Some attributes are best set through more specialized methods, to avoid interfering with
* built-in behaviour:
*
* - 'class': {@link addExtraClass()} * - 'class': {@link addExtraClass()}
* - 'title': {@link setDescription()} * - 'title': {@link setDescription()}
* - 'value': {@link setValue} * - 'value': {@link setValue}
* - 'name': {@link setName} * - 'name': {@link setName}
* *
* CAUTION Doesn't work on most fields which are composed of more than one HTML form field: * Caution: this doesn't work on most fields which are composed of more than one HTML form
* AjaxUniqueTextField, CheckboxSetField, CompositeField, ConfirmedPasswordField, * field.
* CountryDropdownField, CreditCardField, CurrencyField, DateField, DatetimeField, FieldGroup, GridField,
* HtmlEditorField, ImageField, ImageFormAction, InlineFormAction, ListBoxField, etc.
* *
* @param string * @param string $name
* @param string * @param string $value
*
* @return $this
*/ */
public function setAttribute($name, $value) { public function setAttribute($name, $value) {
$this->attributes[$name] = $value; $this->attributes[$name] = $value;
return $this; return $this;
} }
/** /**
* Get an HTML attribute defined by the field, or added through {@link setAttribute()}. * Get an HTML attribute defined by the field, or added through {@link setAttribute()}.
* Caution: Doesn't work on all fields, see {@link setAttribute()}.
* *
* @return string * Caution: this doesn't work on all fields, see {@link setAttribute()}.
*
* @return null|string
*/ */
public function getAttribute($name) { public function getAttribute($name) {
$attrs = $this->getAttributes(); $attributes = $this->getAttributes();
if(isset($attrs[$name])) return $attrs[$name];
if(isset($attributes[$name])) {
return $attributes[$name];
}
return null;
} }
/** /**
@ -445,7 +552,7 @@ class FormField extends RequestHandler {
* @return array * @return array
*/ */
public function getAttributes() { public function getAttributes() {
$attrs = array( $attributes = array(
'type' => 'text', 'type' => 'text',
'name' => $this->getName(), 'name' => $this->getName(),
'value' => $this->Value(), 'value' => $this->Value(),
@ -455,54 +562,67 @@ class FormField extends RequestHandler {
'readonly' => $this->isReadonly() 'readonly' => $this->isReadonly()
); );
if ($this->Required()) { if($this->Required()) {
$attrs['required'] = 'required'; $attributes['required'] = 'required';
$attrs['aria-required'] = 'true'; $attributes['aria-required'] = 'true';
} }
$attrs = array_merge($attrs, $this->attributes); $attributes = array_merge($attributes, $this->attributes);
$this->extend('updateAttributes', $attrs); $this->extend('updateAttributes', $attributes);
return $attrs; return $attributes;
} }
/** /**
* @param Array Custom attributes to process. Falls back to {@link getAttributes()}. * Custom attributes to process. Falls back to {@link getAttributes()}.
* If at least one argument is passed as a string, all arguments act as excludes by name.
* *
* @return string HTML attributes, ready for insertion into an HTML tag * If at least one argument is passed as a string, all arguments act as excludes, by name.
*
* @param array $attributes
*
* @return string
*/ */
public function getAttributesHTML($attrs = null) { public function getAttributesHTML($attributes = null) {
$exclude = (is_string($attrs)) ? func_get_args() : null; $exclude = null;
if(!$attrs || is_string($attrs)) { if(is_string($attributes)) {
$attrs = $this->getAttributes(); $exclude = func_get_args();
} }
// Remove empty if(!$attributes || is_string($attributes)) {
$attrs = array_filter((array)$attrs, function($v) { $attributes = $this->getAttributes();
}
$attributes = (array) $attributes;
$attributes = array_filter($attributes, function ($v) {
return ($v || $v === 0 || $v === '0'); return ($v || $v === 0 || $v === '0');
}); });
// Remove excluded
if($exclude) { if($exclude) {
$attrs = array_diff_key($attrs, array_flip($exclude)); $attributes = array_diff_key(
$attributes,
array_flip($exclude)
);
} }
// Create markup // Create markup
$parts = array(); $parts = array();
foreach($attrs as $name => $value) { foreach($attributes as $name => $value) {
$parts[] = ($value === true) ? "{$name}=\"{$name}\"" : "{$name}=\"" . Convert::raw2att($value) . "\""; if($value === true) {
$parts[] = sprintf('%s="%s"', $name, $name);
} else {
$parts[] = sprintf('%s="%s"', $name, Convert::raw2att($value));
}
} }
return implode(' ', $parts); return implode(' ', $parts);
} }
/** /**
* Returns a version of a title suitable for insertion into an HTML * Returns a version of a title suitable for insertion into an HTML attribute.
* attribute.
* *
* @return string * @return string
*/ */
@ -511,8 +631,7 @@ class FormField extends RequestHandler {
} }
/** /**
* Returns a version of a title suitable for insertion into an HTML * Returns a version of a title suitable for insertion into an HTML attribute.
* attribute.
* *
* @return string * @return string
*/ */
@ -524,8 +643,9 @@ class FormField extends RequestHandler {
* Set the field value. * Set the field value.
* *
* @param mixed $value * @param mixed $value
* @param mixed $data Optional data source passed in by {@see Form::loadDataFrom} * @param null|array|DataObject $data {@see Form::loadDataFrom}
* @return FormField Self reference *
* @return $this
*/ */
public function setValue($value) { public function setValue($value) {
$this->value = $value; $this->value = $value;
@ -534,11 +654,11 @@ class FormField extends RequestHandler {
} }
/** /**
* Set the field name * Set the field name.
* *
* @param string $name * @param string $name
* *
* @return FormField * @return $this
*/ */
public function setName($name) { public function setName($name) {
$this->name = $name; $this->name = $name;
@ -549,12 +669,11 @@ class FormField extends RequestHandler {
/** /**
* Set the container form. * Set the container form.
* *
* This is called whenever you create a new form and put fields inside it, * This is called automatically when fields are added to forms.
* so that you don't have to worry about linking the two.
* *
* @param Form * @param Form $form
* *
* @return FormField * @return $this
*/ */
public function setForm($form) { public function setForm($form) {
$this->form = $form; $this->form = $form;
@ -572,8 +691,7 @@ class FormField extends RequestHandler {
} }
/** /**
* Return TRUE if security token protection is enabled on the parent * Return true if security token protection is enabled on the parent {@link Form}.
* {@link Form}.
* *
* @return bool * @return bool
*/ */
@ -588,10 +706,14 @@ class FormField extends RequestHandler {
} }
/** /**
* @param string $message Message to show to the user. Allows HTML content, * Sets the error message to be displayed on the form field.
* which means you need to use Convert::raw2xml() for any user supplied data. *
* Allows HTML content, so remember to use Convert::raw2xml().
*
* @param string $message
* @param string $messageType * @param string $messageType
* @return FormField *
* @return $this
*/ */
public function setError($message, $messageType) { public function setError($message, $messageType) {
$this->message = $message; $this->message = $message;
@ -601,24 +723,23 @@ class FormField extends RequestHandler {
} }
/** /**
* Set the custom error message to show instead of the default * Set the custom error message to show instead of the default format.
* format of Please Fill In XXX. Different from setError() as
* that appends it to the standard error messaging.
* *
* @param string $msg Message for the error * Different from setError() as that appends it to the standard error messaging.
* *
* @return FormField * @param string $customValidationMessage
*
* @return $this
*/ */
public function setCustomValidationMessage($msg) { public function setCustomValidationMessage($customValidationMessage) {
$this->customValidationMessage = $msg; $this->customValidationMessage = $customValidationMessage;
return $this; return $this;
} }
/** /**
* Get the custom error message for this form field. If a custom * Get the custom error message for this form field. If a custom message has not been defined
* message has not been defined then just return blank. The default * then just return blank. The default error is defined on {@link Validator}.
* error is defined on {@link Validator}.
* *
* @return string * @return string
*/ */
@ -629,12 +750,12 @@ class FormField extends RequestHandler {
/** /**
* Set name of template (without path or extension). * Set name of template (without path or extension).
* *
* Caution: Not consistently implemented in all subclasses, please check * Caution: Not consistently implemented in all subclasses, please check the {@link Field()}
* the {@link Field()} method on the subclass for support. * method on the subclass for support.
* *
* @param string $template * @param string $template
* *
* @return FormField * @return $this
*/ */
public function setTemplate($template) { public function setTemplate($template) {
$this->template = $template; $this->template = $template;
@ -657,18 +778,18 @@ class FormField extends RequestHandler {
} }
/** /**
* Set name of template (without path or extension) for the holder, * Set name of template (without path or extension) for the holder, which in turn is
* which in turn is responsible for rendering {@link Field()}. * responsible for rendering {@link Field()}.
* *
* Caution: Not consistently implemented in all subclasses, * Caution: Not consistently implemented in all subclasses, please check the {@link Field()}
* please check the {@link Field()} method on the subclass for support. * method on the subclass for support.
* *
* @param string $template * @param string $fieldHolderTemplate
* *
* @return FormField * @return $this
*/ */
public function setFieldHolderTemplate($template) { public function setFieldHolderTemplate($fieldHolderTemplate) {
$this->fieldHolderTemplate = $template; $this->fieldHolderTemplate = $fieldHolderTemplate;
return $this; return $this;
} }
@ -681,50 +802,67 @@ class FormField extends RequestHandler {
} }
/** /**
* Set name of template (without path or extension) for the small holder, * Set name of template (without path or extension) for the small holder, which in turn is
* which in turn is responsible for rendering {@link Field()}. * responsible for rendering {@link Field()}.
* *
* Caution: Not consistently implemented in all subclasses, * Caution: Not consistently implemented in all subclasses, please check the {@link Field()}
* please check the {@link Field()} method on the subclass for support. * method on the subclass for support.
* *
* @param string * @param string $smallFieldHolderTemplate
*
* @return $this
*/ */
public function setSmallFieldHolderTemplate($template) { public function setSmallFieldHolderTemplate($smallFieldHolderTemplate) {
$this->smallFieldHolderTemplate = $template; $this->smallFieldHolderTemplate = $smallFieldHolderTemplate;
return $this; return $this;
} }
/** /**
* Returns the form field - used by templates. * Returns the form field.
*
* Although FieldHolder is generally what is inserted into templates, all of the field holder * Although FieldHolder is generally what is inserted into templates, all of the field holder
* templates make use of $Field. It's expected that FieldHolder will give you the "complete" * templates make use of $Field. It's expected that FieldHolder will give you the "complete"
* representation of the field on the form, whereas Field will give you the core editing widget, * representation of the field on the form, whereas Field will give you the core editing widget,
* such as an input tag. * such as an input tag.
* *
* @param array $properties key value pairs of template variables * @param array $properties
*
* @return string * @return string
*/ */
public function Field($properties = array()) { public function Field($properties = array()) {
$obj = ($properties) ? $this->customise($properties) : $this; $context = $this;
if(count($properties)) {
$context = $context->customise($properties);
}
$this->extend('onBeforeRender', $this); $this->extend('onBeforeRender', $this);
return $obj->renderWith($this->getTemplates());
return $context->renderWith($this->getTemplates());
} }
/** /**
* Returns a "field holder" for this field - used by templates. * Returns a "field holder" for this field.
* *
* Forms are constructed by concatenating a number of these field holders. * Forms are constructed by concatenating a number of these field holders.
*
* The default field holder is a label and a form field inside a div. * The default field holder is a label and a form field inside a div.
*
* @see FieldHolder.ss * @see FieldHolder.ss
* *
* @param array $properties key value pairs of template variables * @param array $properties
*
* @return string * @return string
*/ */
public function FieldHolder($properties = array()) { public function FieldHolder($properties = array()) {
$obj = ($properties) ? $this->customise($properties) : $this; $context = $this;
return $obj->renderWith($this->getFieldHolderTemplates()); if(count($properties)) {
$context = $this->customise($properties);
}
return $context->renderWith($this->getFieldHolderTemplates());
} }
/** /**
@ -735,13 +873,17 @@ class FormField extends RequestHandler {
* @return string * @return string
*/ */
public function SmallFieldHolder($properties = array()) { public function SmallFieldHolder($properties = array()) {
$obj = ($properties) ? $this->customise($properties) : $this; $context = $this;
return $obj->renderWith($this->getSmallFieldHolderTemplates()); if(count($properties)) {
$context = $this->customise($properties);
}
return $context->renderWith($this->getSmallFieldHolderTemplates());
} }
/** /**
* Returns an array of templates to use for rendering {@link FieldH} * Returns an array of templates to use for rendering {@link FieldHolder}.
* *
* @return array * @return array
*/ */
@ -750,7 +892,7 @@ class FormField extends RequestHandler {
} }
/** /**
* Returns an array of templates to use for rendering {@link FieldHolder} * Returns an array of templates to use for rendering {@link FieldHolder}.
* *
* @return array * @return array
*/ */
@ -762,7 +904,7 @@ class FormField extends RequestHandler {
} }
/** /**
* Returns an array of templates to use for rendering {@link SmallFieldHolder} * Returns an array of templates to use for rendering {@link SmallFieldHolder}.
* *
* @return array * @return array
*/ */
@ -775,31 +917,37 @@ class FormField extends RequestHandler {
/** /**
* Generate an array of classname strings to use for rendering this form * Generate an array of class name strings to use for rendering this form field into HTML.
* field into HTML
* *
* @param string $custom custom template (if set) * @param string $customTemplate
* @param string $suffix template suffix * @param string $customTemplateSuffix
* *
* @return array $stack a stack of * @return array
*/ */
private function _templates($custom = null, $suffix = null) { private function _templates($customTemplate = null, $customTemplateSuffix = null) {
$matches = array(); $matches = array();
foreach(array_reverse(ClassInfo::ancestry($this)) as $className) { foreach(array_reverse(ClassInfo::ancestry($this)) as $className) {
$matches[] = $className . $suffix; $matches[] = $className . $customTemplateSuffix;
if($className == "FormField") break; if($className == "FormField") {
break;
}
} }
if($custom) array_unshift($matches, $custom); if($customTemplate) {
array_unshift($matches, $customTemplate);
}
return $matches; return $matches;
} }
/** /**
* Returns true if this field is a composite field. * Returns true if this field is a composite field.
*
* To create composite field types, you should subclass {@link CompositeField}. * To create composite field types, you should subclass {@link CompositeField}.
*
* @return bool
*/ */
public function isComposite() { public function isComposite() {
return false; return false;
@ -807,99 +955,138 @@ class FormField extends RequestHandler {
/** /**
* Returns true if this field has its own data. * Returns true if this field has its own data.
* Some fields, such as titles and composite fields, don't actually have any data. It doesn't *
* make sense for data-focused methods to look at them. By overloading hasData() to return false, * Some fields, such as titles and composite fields, don't actually have any data. It doesn't
* you can prevent any data-focused methods from looking at it. * make sense for data-focused methods to look at them. By overloading hasData() to return
* false, you can prevent any data-focused methods from looking at it.
* *
* @see FieldList::collateDataFields() * @see FieldList::collateDataFields()
*
* @return bool
*/ */
public function hasData() { public function hasData() {
return true; return true;
} }
/** /**
* @return boolean * @return bool
*/ */
public function isReadonly() { public function isReadonly() {
return $this->readonly; return $this->readonly;
} }
/** /**
* Sets readonly-flag on form-field. Please use performReadonlyTransformation() * Sets a read-only flag on this FormField.
* to actually transform this instance. *
* @param $bool boolean Setting "false" has no effect on the field-state. * Use performReadonlyTransformation() to transform this instance.
*
* Setting this to false has no effect on the field.
*
* @param bool $readonly
*
* @return $this
*/ */
public function setReadonly($bool) { public function setReadonly($readonly) {
$this->readonly = $bool; $this->readonly = $readonly;
return $this; return $this;
} }
/** /**
* @return boolean * @return bool
*/ */
public function isDisabled() { public function isDisabled() {
return $this->disabled; return $this->disabled;
} }
/** /**
* Sets disabed-flag on form-field. Please use performDisabledTransformation() * Sets a disabled flag on this FormField.
* to actually transform this instance. *
* @param $bool boolean Setting "false" has no effect on the field-state. * Use performDisabledTransformation() to transform this instance.
*
* Setting this to false has no effect on the field.
*
* @param bool $disabled
*
* @return $this
*/ */
public function setDisabled($bool) { public function setDisabled($disabled) {
$this->disabled = $bool; $this->disabled = $disabled;
return $this; return $this;
} }
/** /**
* Returns a readonly version of this field * Returns a read-only version of this field.
*
* @return FormField
*/ */
public function performReadonlyTransformation() { public function performReadonlyTransformation() {
$readonlyClassName = $this->class . '_Disabled'; $readonlyClassName = $this->class . '_Readonly';
if(ClassInfo::exists($readonlyClassName)) { if(ClassInfo::exists($readonlyClassName)) {
$clone = $this->castedCopy($readonlyClassName); $clone = $this->castedCopy($readonlyClassName);
} else { } else {
$clone = $this->castedCopy('ReadonlyField'); $clone = $this->castedCopy('ReadonlyField');
$clone->setReadonly(true); }
}
$clone->setReadonly(true);
return $clone; return $clone;
} }
/** /**
* Return a disabled version of this field. * Return a disabled version of this field.
* Tries to find a class of the class name of this field suffixed with "_Disabled", *
* failing that, finds a method {@link setDisabled()}. * Tries to find a class of the class name of this field suffixed with "_Disabled", failing
* that, finds a method {@link setDisabled()}.
* *
* @return FormField * @return FormField
*/ */
public function performDisabledTransformation() { public function performDisabledTransformation() {
$disabledClassName = $this->class . '_Disabled'; $disabledClassName = $this->class . '_Disabled';
if(ClassInfo::exists($disabledClassName)) { if(ClassInfo::exists($disabledClassName)) {
$clone = $this->castedCopy($disabledClassName); $clone = $this->castedCopy($disabledClassName);
} else { } else {
$clone = clone $this; $clone = clone $this;
$clone->setDisabled(true);
} }
return $clone; $clone->setDisabled(true);
}
public function transform(FormTransformation $trans) { return $clone;
return $trans->transform($this);
} }
public function hasClass($class){ /**
$patten = '/'.strtolower($class).'/i'; * @param FormTransformation $transformation
$subject = strtolower($this->class." ".$this->extraClass()); *
* @return mixed
*/
public function transform(FormTransformation $transformation) {
return $transformation->transform($this);
}
/**
* @param string $class
*
* @return int
*/
public function hasClass($class) {
$patten = '/' . strtolower($class) . '/i';
$subject = strtolower($this->class . ' ' . $this->extraClass());
return preg_match($patten, $subject); return preg_match($patten, $subject);
} }
/** /**
* Returns the field type - used by templates. * Returns the field type.
*
* The field type is the class name with the word Field dropped off the end, all lowercase. * The field type is the class name with the word Field dropped off the end, all lowercase.
* It's handy for assigning HTML classes. Doesn't signify the <input type> attribute, *
* see {link getAttributes()}. * It's handy for assigning HTML classes. Doesn't signify the <input type> attribute.
*
* @see {link getAttributes()}.
* *
* @return string * @return string
*/ */
@ -909,18 +1096,28 @@ class FormField extends RequestHandler {
/** /**
* @deprecated 4.0 Use FormField::create_tag() * @deprecated 4.0 Use FormField::create_tag()
*
* @param string $tag
* @param array $attributes
* @param null|string $content
*
* @return string
*/ */
public function createTag($tag, $attributes, $content = null) { public function createTag($tag, $attributes, $content = null) {
Deprecation::notice('4.0', 'Use FormField::create_tag()'); Deprecation::notice('4.0', 'Use FormField::create_tag()');
return self::create_tag($tag, $attributes, $content); return self::create_tag($tag, $attributes, $content);
} }
/** /**
* Validation method each {@link FormField} subclass should implement, * Abstract method each {@link FormField} subclass must implement, determines whether the field
* determining whether the field is valid or not based on the value. * is valid or not based on the value.
*
* @todo Make this abstract.
* *
* @param Validator $validator * @param Validator $validator
* @return boolean *
* @return bool
*/ */
public function validate($validator) { public function validate($validator) {
return true; return true;
@ -928,13 +1125,16 @@ class FormField extends RequestHandler {
/** /**
* Describe this field, provide help text for it. * Describe this field, provide help text for it.
* By default, renders as a <span class="description">
* underneath the form field.
* *
* @return string Description * By default, renders as a <span class="description"> underneath the form field.
*
* @param string $description
*
* @return $this
*/ */
public function setDescription($description) { public function setDescription($description) {
$this->description = $description; $this->description = $description;
return $this; return $this;
} }
@ -945,37 +1145,51 @@ class FormField extends RequestHandler {
return $this->description; return $this->description;
} }
/**
* @return string
*/
public function debug() { public function debug() {
return "$this->class ($this->name: $this->title : <font style='color:red;'>$this->message</font>)" return sprintf(
. " = $this->value"; '%s (%s: %s : <span style="color:red;">%s</span>) = %s',
$this->class,
$this->name,
$this->title,
$this->message,
$this->value
);
} }
/** /**
* This function is used by the template processor. If you refer to a field as a $ variable, it * This function is used by the template processor. If you refer to a field as a $ variable, it
* will return the $Field value. * will return the $Field value.
*
* @return string
*/ */
public function forTemplate() { public function forTemplate() {
return $this->Field(); return $this->Field();
} }
/** /**
* @uses Validator->fieldIsRequired() * @return bool
* @return boolean
*/ */
public function Required() { public function Required() {
if($this->form && ($validator = $this->form->Validator)) { if($this->form && ($validator = $this->form->Validator)) {
return $validator->fieldIsRequired($this->name); return $validator->fieldIsRequired($this->name);
} }
return false;
} }
/** /**
* Set the FieldList that contains this field. * Set the FieldList that contains this field.
* *
* @param FieldList $list * @param FieldList $containerFieldList
*
* @return FieldList * @return FieldList
*/ */
public function setContainerFieldList($list) { public function setContainerFieldList($containerFieldList) {
$this->containerFieldList = $list; $this->containerFieldList = $containerFieldList;
return $this; return $this;
} }
@ -988,31 +1202,46 @@ class FormField extends RequestHandler {
return $this->containerFieldList; return $this->containerFieldList;
} }
/**
* @return null|FieldList
*/
public function rootFieldList() { public function rootFieldList() {
if(is_object($this->containerFieldList)) return $this->containerFieldList->rootFieldList(); if(is_object($this->containerFieldList)) {
else user_error("rootFieldList() called on $this->class object without a containerFieldList", E_USER_ERROR); return $this->containerFieldList->rootFieldList();
}
user_error(
"rootFieldList() called on $this->class object without a containerFieldList",
E_USER_ERROR
);
return null;
} }
/** /**
* Returns another instance of this field, but "cast" to a different class. * Returns another instance of this field, but "cast" to a different class. The logic tries to
* The logic tries to retain all of the instance properties, * retain all of the instance properties, and may be overloaded by subclasses to set additional
* and may be overloaded by subclasses to set additional ones. * ones.
* *
* Assumes the standard FormField parameter signature with * Assumes the standard FormField parameter signature with its name as the only mandatory
* its name as the only mandatory argument. Mainly geared towards * argument. Mainly geared towards creating *_Readonly or *_Disabled subclasses of the same
* creating *_Readonly or *_Disabled subclasses of the same type, * type, or casting to a {@link ReadonlyField}.
* or casting to a {@link ReadonlyField}.
* *
* Does not copy custom field templates, since they probably won't apply to * Does not copy custom field templates, since they probably won't apply to the new instance.
* the new instance. *
* @param mixed $classOrCopy Class name for copy, or existing copy instance to update
* *
* @param String $classOrCopy Class name for copy, or existing copy instance to update
* @return FormField * @return FormField
*/ */
public function castedCopy($classOrCopy) { public function castedCopy($classOrCopy) {
$field = (is_object($classOrCopy)) ? $classOrCopy : new $classOrCopy($this->name); $field = $classOrCopy;
if(!is_object($field)) {
$field = new $classOrCopy($this->name);
}
$field $field
->setValue($this->value) // get value directly from property, avoid any conversions ->setValue($this->value)
->setForm($this->form) ->setForm($this->form)
->setTitle($this->Title()) ->setTitle($this->Title())
->setLeftTitle($this->LeftTitle()) ->setLeftTitle($this->LeftTitle())
@ -1020,12 +1249,12 @@ class FormField extends RequestHandler {
->addExtraClass($this->extraClass()) ->addExtraClass($this->extraClass())
->setDescription($this->getDescription()); ->setDescription($this->getDescription());
// Only include built-in attributes, ignore anything // Only include built-in attributes, ignore anything set through getAttributes().
// set through getAttributes(), since those might change important characteristics // Those might change important characteristics of the field, e.g. its "type" attribute.
// of the field, e.g. its "type" attribute. foreach($this->attributes as $attributeKey => $attributeValue) {
foreach($this->attributes as $k => $v) { $field->setAttribute($attributeKey, $attributeValue);
$field->setAttribute($k, $v); }
}
$field->dontEscape = $this->dontEscape; $field->dontEscape = $this->dontEscape;
return $field; return $field;

View File

@ -10,6 +10,9 @@
* For any statics containing natural language, never use the static directly - * For any statics containing natural language, never use the static directly -
* always wrap it in a getter. * always wrap it in a getter.
* *
* Classes must be able to be constructed without mandatory arguments, otherwise
* this interface will have no effect.
*
* @package framework * @package framework
* @subpackage i18n * @subpackage i18n
* @uses i18nTextCollector->collectFromEntityProviders() * @uses i18nTextCollector->collectFromEntityProviders()

View File

@ -27,15 +27,28 @@
*/ */
class i18nTextCollector extends Object { class i18nTextCollector extends Object {
/**
* Default (master) locale
*
* @var string
*/
protected $defaultLocale; protected $defaultLocale;
/** /**
* @var string $basePath The directory base on which the collector should act. * The directory base on which the collector should act.
* Usually the webroot set through {@link Director::baseFolder()}. * Usually the webroot set through {@link Director::baseFolder()}.
*
* @todo Fully support changing of basePath through {@link SSViewer} and {@link ManifestBuilder} * @todo Fully support changing of basePath through {@link SSViewer} and {@link ManifestBuilder}
*
* @var string
*/ */
public $basePath; public $basePath;
/**
* Save path
*
* @var string
*/
public $baseSavePath; public $baseSavePath;
/** /**
@ -43,99 +56,267 @@ class i18nTextCollector extends Object {
*/ */
protected $writer; protected $writer;
/**
* List of file extensions to parse
*
* @var array
*/
protected $fileExtensions = array('php', 'ss');
/** /**
* @param $locale * @param $locale
*/ */
public function __construct($locale = null) { public function __construct($locale = null) {
$this->defaultLocale = ($locale) ? $locale : i18n::get_lang_from_locale(i18n::default_locale()); $this->defaultLocale = $locale
? $locale
: i18n::get_lang_from_locale(i18n::default_locale());
$this->basePath = Director::baseFolder(); $this->basePath = Director::baseFolder();
$this->baseSavePath = Director::baseFolder(); $this->baseSavePath = Director::baseFolder();
parent::__construct(); parent::__construct();
} }
/**
* Assign a writer
*
* @param i18nTextCollector_Writer $writer
*/
public function setWriter($writer) { public function setWriter($writer) {
$this->writer = $writer; $this->writer = $writer;
} }
/**
* Gets the currently assigned writer, or the default if none is specified.
*
* @return i18nTextCollector_Writer
*/
public function getWriter() { public function getWriter() {
if(!$this->writer) $this->writer = new i18nTextCollector_Writer_RailsYaml(); if(!$this->writer) {
$this->setWriter(Injector::inst()->get('i18nTextCollector_Writer'));
}
return $this->writer; return $this->writer;
} }
/** /**
* This is the main method to build the master string tables with the original strings. * This is the main method to build the master string tables with the
* It will search for existent modules that use the i18n feature, parse the _t() calls * original strings. It will search for existent modules that use the
* and write the resultant files in the lang folder of each module. * i18n feature, parse the _t() calls and write the resultant files
* in the lang folder of each module.
* *
* @uses DataObject->collectI18nStatics() * @uses DataObject->collectI18nStatics()
* *
* @param array $restrictToModules * @param array $restrictToModules
* @param array $mergeWithExisting Merge new master strings with existing ones * @param bool $mergeWithExisting Merge new master strings with existing
* already defined in language files, rather than replacing them. This can be useful * ones already defined in language files, rather than replacing them.
* for long-term maintenance of translations across releases, because it allows * This can be useful for long-term maintenance of translations across
* "translation backports" to older releases without removing strings these older releases * releases, because it allows "translation backports" to older releases
* still rely on. * without removing strings these older releases still rely on.
*/ */
public function run($restrictToModules = null, $mergeWithExisting = false) { public function run($restrictToModules = null, $mergeWithExisting = false) {
$entitiesByModule = $this->collect($restrictToModules, $mergeWithExisting); $entitiesByModule = $this->collect($restrictToModules, $mergeWithExisting);
if(empty($entitiesByModule)) {
return;
}
// Write each module language file // Write each module language file
if($entitiesByModule) foreach($entitiesByModule as $module => $entities) { foreach($entitiesByModule as $module => $entities) {
$this->getWriter()->write($entities, $this->defaultLocale, $this->baseSavePath . '/' . $module); // Skip empty translations
if(empty($entities)) {
continue;
}
// Clean sorting prior to writing
ksort($entities);
$path = $this->baseSavePath . '/' . $module;
$this->getWriter()->write($entities, $this->defaultLocale, $path);
} }
} }
public function collect($restrictToModules = null, $mergeWithExisting = false) { /**
$modules = scandir($this->basePath); * Gets the list of modules in this installer
$themeFolders = array(); *
* @param string $directory Path to look in
* @return array List of modules as paths relative to base
*/
protected function getModules($directory) {
// Include self as head module
$modules = array();
// A master string tables array (one mst per module) // Get all standard modules
$entitiesByModule = array(); foreach(glob($directory."/*", GLOB_ONLYDIR) as $path) {
// Check for _config
if(!is_file("$path/_config.php") && !is_dir("$path/_config")) {
continue;
}
$modules[] = basename($path);
}
foreach($modules as $index => $module){ // Get all themes
if($module != 'themes') continue; foreach(glob($directory."/themes/*", GLOB_ONLYDIR) as $path) {
else { // Check for templates
$themes = scandir($this->basePath."/themes"); if(is_dir("$path/templates")) {
if(count($themes)){ $modules[] = 'themes/'.basename($path);
foreach($themes as $theme) {
if(is_dir($this->basePath."/themes/".$theme)
&& substr($theme,0,1) != '.'
&& is_dir($this->basePath."/themes/".$theme."/templates")){
$themeFolders[] = 'themes/'.$theme;
}
}
}
$themesInd = $index;
} }
} }
if(isset($themesInd)) { return $modules;
unset($modules[$themesInd]); }
/**
* Extract all strings from modules and return these grouped by module name
*
* @param array $restrictToModules
* @param bool $mergeWithExisting
* @return array
*/
public function collect($restrictToModules = array(), $mergeWithExisting = false) {
$entitiesByModule = $this->getEntitiesByModule();
// Resolve conflicts between duplicate keys across modules
$entitiesByModule = $this->resolveDuplicateConflicts($entitiesByModule);
// Optionally merge with existing master strings
if($mergeWithExisting) {
$entitiesByModule = $this->mergeWithExisting($entitiesByModule);
} }
$modules = array_merge($modules, $themeFolders); // Restrict modules we update to just the specified ones (if any passed)
if(!empty($restrictToModules)) {
foreach (array_diff(array_keys($entitiesByModule), $restrictToModules) as $module) {
unset($entitiesByModule[$module]);
}
}
return $entitiesByModule;
}
foreach($modules as $module) { /**
// Only search for calls in folder with a _config.php file or _config folder * Resolve conflicts between duplicate keys across modules
// (which means they are modules, including themes folder) *
$isValidModuleFolder = ( * @param array $entitiesByModule List of all modules with keys
is_dir("$this->basePath/$module") * @return array Filtered listo of modules with duplicate keys unassigned
&& substr($module,0,1) != '.' */
&& ( protected function resolveDuplicateConflicts($entitiesByModule) {
is_file("$this->basePath/$module/_config.php") // Find all keys that exist across multiple modules
|| is_dir("$this->basePath/$module/_config") $conflicts = $this->getConflicts($entitiesByModule);
) foreach($conflicts as $conflict) {
) || ( // Determine if we can narrow down the ownership
substr($module,0,7) == 'themes/' $bestModule = $this->getBestModuleForKey($entitiesByModule, $conflict);
&& is_dir("$this->basePath/$module") if(!$bestModule) {
continue;
}
// Remove foreign duplicates
foreach($entitiesByModule as $module => $entities) {
if($module !== $bestModule) {
unset($entitiesByModule[$module][$conflict]);
}
}
}
return $entitiesByModule;
}
/**
* Find all keys in the entity list that are duplicated across modules
*
* @param array $entitiesByModule
* @return array List of keys
*/
protected function getConflicts($entitiesByModule) {
$modules = array_keys($entitiesByModule);
$allConflicts = array();
// bubble-compare each group of modules
for($i = 0; $i < count($modules) - 1; $i++) {
$left = array_keys($entitiesByModule[$modules[$i]]);
for($j = $i+1; $j < count($modules); $j++) {
$right = array_keys($entitiesByModule[$modules[$j]]);
$conflicts = array_intersect($left, $right);
$allConflicts = array_merge($allConflicts, $conflicts);
}
}
return array_unique($allConflicts);
}
/**
* Determine the best module to be given ownership over this key
*
* @param array $entitiesByModule
* @param string $key
* @return string Best module, if found
*/
protected function getBestModuleForKey($entitiesByModule, $key) {
// Check classes
$class = current(explode('.', $key));
$owner = i18n::get_owner_module($class);
if($owner) {
return $owner;
}
// @todo - How to determine ownership of templates? Templates can
// exist in multiple locations with the same name.
// Display notice if not found
Debug::message(
"Duplicate key {$key} detected in multiple modules with no obvious owner",
false
);
// Fall back to framework then cms modules
foreach(array('framework', 'cms') as $module) {
if(isset($entitiesByModule[$module][$key])) {
return $module;
}
}
// Do nothing
return null;
}
/**
* Merge all entities with existing strings
*
* @param array $entitiesByModule
* @return array
*/
protected function mergeWithExisting($entitiesByModule) {
// TODO Support all defined source formats through i18n::get_translators().
// Currently not possible because adapter instances can't be fully reset through the Zend API,
// meaning master strings accumulate across modules
foreach($entitiesByModule as $module => $entities) {
$adapter = Injector::inst()->create('i18nRailsYamlAdapter');
$fileName = $adapter->getFilenameForLocale($this->defaultLocale);
$masterFile = "{$this->basePath}/{$module}/lang/{$fileName}";
if(!file_exists($masterFile)) {
continue;
}
$adapter->addTranslation(array(
'content' => $masterFile,
'locale' => $this->defaultLocale
));
$entitiesByModule[$module] = array_merge(
array_map(
// Transform each master string from scalar value to array of strings
function($v) {return array($v);},
$adapter->getMessages($this->defaultLocale)
),
$entities
); );
}
return $entitiesByModule;
}
if(!$isValidModuleFolder) continue; /**
* Collect all entities grouped by module
*
* @return array
*/
protected function getEntitiesByModule() {
// A master string tables array (one mst per module)
$entitiesByModule = array();
$modules = $this->getModules($this->basePath);
foreach($modules as $module) {
// we store the master string tables // we store the master string tables
$processedEntities = $this->processModule($module); $processedEntities = $this->processModule($module);
if(isset($entitiesByModule[$module])) { if(isset($entitiesByModule[$module])) {
$entitiesByModule[$module] = array_merge_recursive($entitiesByModule[$module], $processedEntities); $entitiesByModule[$module] = array_merge_recursive($entitiesByModule[$module], $processedEntities);
} else { } else {
@ -143,54 +324,23 @@ class i18nTextCollector extends Object {
} }
// extract all entities for "foreign" modules (fourth argument) // extract all entities for "foreign" modules (fourth argument)
// @see CMSMenu::provideI18nEntities for an example usage
foreach($entitiesByModule[$module] as $fullName => $spec) { foreach($entitiesByModule[$module] as $fullName => $spec) {
if(isset($spec[2]) && $spec[2] && $spec[2] != $module) { if(!empty($spec[2]) && $spec[2] !== $module) {
$othermodule = $spec[2]; $othermodule = $spec[2];
if(!isset($entitiesByModule[$othermodule])) $entitiesByModule[$othermodule] = array(); if(!isset($entitiesByModule[$othermodule])) {
$entitiesByModule[$othermodule] = array();
}
unset($spec[2]); unset($spec[2]);
$entitiesByModule[$othermodule][$fullName] = $spec; $entitiesByModule[$othermodule][$fullName] = $spec;
unset($entitiesByModule[$module][$fullName]); unset($entitiesByModule[$module][$fullName]);
} }
} }
// Optionally merge with existing master strings
// TODO Support all defined source formats through i18n::get_translators().
// Currently not possible because adapter instances can't be fully reset through the Zend API,
// meaning master strings accumulate across modules
if($mergeWithExisting) {
$adapter = Injector::inst()->create(
'i18nRailsYamlAdapter',
array('locale' => 'auto')
);
$masterFile = "{$this->basePath}/{$module}/lang/"
. $adapter->getFilenameForLocale($this->defaultLocale);
if(!file_exists($masterFile)) continue;
$adapter->addTranslation(array(
'content' => $masterFile,
'locale' => $this->defaultLocale
));
$entitiesByModule[$module] = array_merge(
array_map(
// Transform each master string from scalar value to array of strings
function($v) {return array($v);},
$adapter->getMessages($this->defaultLocale)
),
$entitiesByModule[$module]
);
}
} }
// Restrict modules we update to just the specified ones (if any passed)
if($restrictToModules && count($restrictToModules)) {
foreach (array_diff(array_keys($entitiesByModule), $restrictToModules) as $module) {
unset($entitiesByModule[$module]);
}
}
return $entitiesByModule; return $entitiesByModule;
} }
public function write($module, $entities) { public function write($module, $entities) {
$this->getWriter()->write($entities, $this->defaultLocale, $this->baseSavePath . '/' . $module); $this->getWriter()->write($entities, $this->defaultLocale, $this->baseSavePath . '/' . $module);
return $this; return $this;
@ -200,38 +350,31 @@ class i18nTextCollector extends Object {
* Builds a master string table from php and .ss template files for the module passed as the $module param * Builds a master string table from php and .ss template files for the module passed as the $module param
* @see collectFromCode() and collectFromTemplate() * @see collectFromCode() and collectFromTemplate()
* *
* @param string $module A module's name or just 'themes' * @param string $module A module's name or just 'themes/<themename>'
* @return array $entities An array of entities found in the files that comprise the module * @return array An array of entities found in the files that comprise the module
* @todo Why the type juggling for $this->collectFromBlah()? They always return arrays.
*/ */
protected function processModule($module) { protected function processModule($module) {
$entities = array(); $entities = array();
// Search for calls in code files if these exists // Search for calls in code files if these exists
$fileList = array(); $fileList = $this->getFileListForModule($module);
if(is_dir("$this->basePath/$module/code")) {
$fileList = $this->getFilesRecursive("$this->basePath/$module/code");
} else if($module == FRAMEWORK_DIR || substr($module, 0, 7) == 'themes/') {
// framework doesn't have the usual module structure, so we'll scan all subfolders
$fileList = $this->getFilesRecursive("$this->basePath/$module", null, null, '/\/(tests|dev)$/');
}
foreach($fileList as $filePath) { foreach($fileList as $filePath) {
// exclude ss-templates, they're scanned separately $extension = pathinfo($filePath, PATHINFO_EXTENSION);
if(substr($filePath,-3) == 'php') { $content = file_get_contents($filePath);
$content = file_get_contents($filePath); // Filter based on extension
$entities = array_merge($entities,(array)$this->collectFromCode($content, $module)); if($extension === 'php') {
$entities = array_merge($entities, (array)$this->collectFromEntityProviders($filePath, $module)); $entities = array_merge(
} $entities,
} $this->collectFromCode($content, $module),
$this->collectFromEntityProviders($filePath, $module)
// Search for calls in template files if these exists );
if(is_dir("$this->basePath/$module/")) { } elseif($extension === 'ss') {
$fileList = $this->getFilesRecursive("$this->basePath/$module/", null, 'ss');
foreach($fileList as $index => $filePath) {
$content = file_get_contents($filePath);
// templates use their filename as a namespace // templates use their filename as a namespace
$namespace = basename($filePath); $namespace = basename($filePath);
$entities = array_merge($entities, (array)$this->collectFromTemplate($content, $module, $namespace)); $entities = array_merge(
$entities,
$this->collectFromTemplate($content, $module, $namespace)
);
} }
} }
@ -241,11 +384,44 @@ class i18nTextCollector extends Object {
return $entities; return $entities;
} }
/**
* Retrieves the list of files for this module
*
* @param type $module
* @return array List of files to parse
*/
protected function getFileListForModule($module) {
$modulePath = "{$this->basePath}/{$module}";
// Search all .ss files in themes
if(stripos($module, 'themes/') === 0) {
return $this->getFilesRecursive($modulePath, null, 'ss');
}
// If Framework or non-standard module structure, so we'll scan all subfolders
if($module === FRAMEWORK_DIR || !is_dir("{$modulePath}/code")) {
return $this->getFilesRecursive($modulePath);
}
// Get code files
$files = $this->getFilesRecursive("{$modulePath}/code", null, 'php');
// Search for templates in this module
if(is_dir("{$modulePath}/templates")) {
$templateFiles = $this->getFilesRecursive("{$modulePath}/templates", null, 'ss');
} else {
$templateFiles = $this->getFilesRecursive($modulePath, null, 'ss');
}
return array_merge($files, $templateFiles);
}
/** /**
* Extracts translatables from .php files. * Extracts translatables from .php files.
* *
* @param string $content The text content of a parsed template-file * @param string $content The text content of a parsed template-file
* @param string $module Module's name or 'themes' * @param string $module Module's name or 'themes'. Could also be a namespace
* Generated by templates includes. E.g. 'UploadField.ss'
* @return array $entities An array of entities representing the extracted translation function calls in code * @return array $entities An array of entities representing the extracted translation function calls in code
*/ */
public function collectFromCode($content, $module) { public function collectFromCode($content, $module) {
@ -328,33 +504,10 @@ class i18nTextCollector extends Object {
* @param string $module Module's name or 'themes' * @param string $module Module's name or 'themes'
* @param string $fileName The name of a template file when method is used in self-referencing mode * @param string $fileName The name of a template file when method is used in self-referencing mode
* @return array $entities An array of entities representing the extracted template function calls * @return array $entities An array of entities representing the extracted template function calls
*
* @todo Why the type juggling for $this->collectFromTemplate()? It always returns an array.
*/ */
public function collectFromTemplate($content, $fileName, $module, &$parsedFiles = array()) { public function collectFromTemplate($content, $fileName, $module, &$parsedFiles = array()) {
$entities = array();
// Search for included templates
preg_match_all('/<' . '% include +([A-Za-z0-9_]+) +%' . '>/', $content, $regs, PREG_SET_ORDER);
foreach($regs as $reg) {
$includeName = $reg[1];
$includeFileName = "{$includeName}.ss";
$filePath = SSViewer::getTemplateFileByType($includeName, 'Includes');
if(!$filePath) $filePath = SSViewer::getTemplateFileByType($includeName, 'main');
if($filePath && !in_array($filePath, $parsedFiles)) {
$parsedFiles[] = $filePath;
$includeContent = file_get_contents($filePath);
$entities = array_merge(
$entities,
(array)$this->collectFromTemplate($includeContent, $module, $includeFileName, $parsedFiles)
);
}
// @todo Will get massively confused if you include the includer -> infinite loop
}
// use parser to extract <%t style translatable entities // use parser to extract <%t style translatable entities
$translatables = i18nTextCollector_Parser::GetTranslatables($content); $entities = i18nTextCollector_Parser::GetTranslatables($content);
$entities = array_merge($entities,(array)$translatables);
// use the old method of getting _t() style translatable entities // use the old method of getting _t() style translatable entities
// Collect in actual template // Collect in actual template
@ -374,31 +527,34 @@ class i18nTextCollector extends Object {
} }
/** /**
* Allows classes which implement i18nEntityProvider to provide
* additional translation strings.
*
* Not all classes can be instanciated without mandatory arguments,
* so entity collection doesn't work for all SilverStripe classes currently
*
* @uses i18nEntityProvider * @uses i18nEntityProvider
* @param string $filePath
* @param string $module
* @return array
*/ */
public function collectFromEntityProviders($filePath, $module = null) { public function collectFromEntityProviders($filePath, $module = null) {
$entities = array(); $entities = array();
// HACK Ugly workaround to avoid "Cannot redeclare class PHPUnit_Framework_TestResult" error
// when running text collector with PHPUnit 3.4. There really shouldn't be any dependencies
// here, but the class reflection enforces autloading of seemingly unrelated classes.
// The main problem here is the CMSMenu class, which iterates through test classes,
// which in turn trigger autoloading of PHPUnit.
$phpunitwrapper = PhpUnitWrapper::inst();
$phpunitwrapper->init();
$classes = ClassInfo::classes_for_file($filePath); $classes = ClassInfo::classes_for_file($filePath);
if($classes) foreach($classes as $class) { foreach($classes as $class) {
// Not all classes can be instanciated without mandatory arguments, // Skip non-implementing classes
// so entity collection doesn't work for all SilverStripe classes currently if(!class_exists($class) || !in_array('i18nEntityProvider', class_implements($class))) {
// Requires PHP 5.1+ continue;
if(class_exists($class) && in_array('i18nEntityProvider', class_implements($class))) {
$reflectionClass = new ReflectionClass($class);
if($reflectionClass->isAbstract()) continue;
$obj = singleton($class);
$entities = array_merge($entities,(array)$obj->provideI18nEntities());
} }
// Skip abstract classes
$reflectionClass = new ReflectionClass($class);
if($reflectionClass->isAbstract()) {
continue;
}
$obj = singleton($class);
$entities = array_merge($entities, (array)$obj->provideI18nEntities());
} }
ksort($entities); ksort($entities);
@ -442,30 +598,35 @@ class i18nTextCollector extends Object {
* *
* @param string $folder base directory to scan (will scan recursively) * @param string $folder base directory to scan (will scan recursively)
* @param array $fileList Array to which potential files will be appended * @param array $fileList Array to which potential files will be appended
* @param string $type Optional, "php" or "ss" * @param string $type Optional, "php" or "ss" only
* @param string $folderExclude Regular expression matching folder names to exclude * @param string $folderExclude Regular expression matching folder names to exclude
* @return array $fileList An array of files * @return array $fileList An array of files
*/ */
protected function getFilesRecursive($folder, $fileList = null, $type = null, $folderExclude = null) { protected function getFilesRecursive($folder, $fileList = array(), $type = null, $folderExclude = '/\/(tests)$/') {
if(!$folderExclude) $folderExclude = '/\/(tests)$/'; if(!$fileList) {
if(!$fileList) $fileList = array(); $fileList = array();
$items = scandir($folder); }
$isValidFolder = ( // Skip ignored folders
!in_array('_manifest_exclude', $items) if(is_file("{$folder}/_manifest_exclude") || preg_match($folderExclude, $folder)) {
&& !preg_match($folderExclude, $folder) return $fileList;
); }
if($items && $isValidFolder) foreach($items as $item) { foreach(glob($folder.'/*') as $path) {
if(substr($item,0,1) == '.') continue; // Recurse if directory
if(substr($item,-4) == '.php' && (!$type || $type == 'php')) { if(is_dir($path)) {
$fileList[substr($item,0,-4)] = "$folder/$item";
} else if(substr($item,-3) == '.ss' && (!$type || $type == 'ss')) {
$fileList[$item] = "$folder/$item";
} else if(is_dir("$folder/$item")) {
$fileList = array_merge( $fileList = array_merge(
$fileList, $fileList,
$this->getFilesRecursive("$folder/$item", $fileList, $type, $folderExclude) $this->getFilesRecursive($path, $fileList, $type, $folderExclude)
); );
continue;
}
// Check if this extension is included
$extension = pathinfo($path, PATHINFO_EXTENSION);
if(in_array($extension, $this->fileExtensions)
&& (!$type || $type === $extension)
) {
$fileList[$path] = $path;
} }
} }
return $fileList; return $fileList;
@ -691,7 +852,9 @@ class i18nTextCollector_Parser extends SSTemplateParser {
// Run the parser and throw away the result // Run the parser and throw away the result
$parser = new i18nTextCollector_Parser($template); $parser = new i18nTextCollector_Parser($template);
if(substr($template, 0,3) == pack("CCC", 0xef, 0xbb, 0xbf)) $parser->pos = 3; if(substr($template, 0,3) == pack("CCC", 0xef, 0xbb, 0xbf)) {
$parser->pos = 3;
}
$parser->match_TopTemplate(); $parser->match_TopTemplate();
return self::$entities; return self::$entities;

View File

@ -135,6 +135,10 @@ class DB {
* Set it to null to revert to the main database. * Set it to null to revert to the main database.
*/ */
public static function set_alternative_database_name($name = null) { public static function set_alternative_database_name($name = null) {
// Skip if CLI
if(Director::is_cli()) {
return;
}
if($name) { if($name) {
if(!self::valid_alternative_database_name($name)) { if(!self::valid_alternative_database_name($name)) {
throw new InvalidArgumentException(sprintf( throw new InvalidArgumentException(sprintf(

View File

@ -419,9 +419,9 @@ class DataList extends ViewableData implements SS_List, SS_Filterable, SS_Sortab
$whereArguments = func_get_arg(0); $whereArguments = func_get_arg(0);
} elseif($numberFuncArgs == 2) { } elseif($numberFuncArgs == 2) {
$whereArguments[func_get_arg(0)] = func_get_arg(1); $whereArguments[func_get_arg(0)] = func_get_arg(1);
} else { } else {
throw new InvalidArgumentException('Incorrect number of arguments passed to exclude()'); throw new InvalidArgumentException('Incorrect number of arguments passed to exclude()');
} }
return $this->alterDataQuery(function($query, $list) use ($whereArguments) { return $this->alterDataQuery(function($query, $list) use ($whereArguments) {
$subquery = $query->disjunctiveGroup(); $subquery = $query->disjunctiveGroup();
@ -436,16 +436,16 @@ class DataList extends ViewableData implements SS_List, SS_Filterable, SS_Sortab
$t = singleton($list->dataClass())->dbObject($field); $t = singleton($list->dataClass())->dbObject($field);
if($filterType) { if($filterType) {
$className = "{$filterType}Filter"; $className = "{$filterType}Filter";
} else { } else {
$className = 'ExactMatchFilter'; $className = 'ExactMatchFilter';
} }
if(!class_exists($className)){ if(!class_exists($className)){
$className = 'ExactMatchFilter'; $className = 'ExactMatchFilter';
array_unshift($modifiers, $filterType); array_unshift($modifiers, $filterType);
} }
$t = new $className($field, $value, $modifiers); $t = new $className($field, $value, $modifiers);
$t->apply($subquery); $t->apply($subquery);
} }
}); });
} }

View File

@ -1771,8 +1771,11 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
$componentClass, $table, $componentField, $parentField, $componentClass, $table, $componentField, $parentField,
$this->manyManyExtraFieldsForComponent($componentName) $this->manyManyExtraFieldsForComponent($componentName)
); );
if($this->model) $result->setDataModel($this->model); if($this->model) $result->setDataModel($this->model);
$this->extend('updateManyManyComponents', $result);
// If this is called on a singleton, then we return an 'orphaned relation' that can have the // If this is called on a singleton, then we return an 'orphaned relation' that can have the
// foreignID set elsewhere. // foreignID set elsewhere.
return $result return $result

View File

@ -58,12 +58,13 @@ class MySQLStatement extends SS_Query {
$variables[] = &$this->boundValues[$field->name]; $variables[] = &$this->boundValues[$field->name];
} }
call_user_func_array(array($this->statement, 'bind_result'), $variables);
$this->bound = true; $this->bound = true;
$this->metadata->free(); $this->metadata->free();
// Buffer all results // Buffer all results
$this->statement->store_result(); $this->statement->store_result();
call_user_func_array(array($this->statement, 'bind_result'), $variables);
} }
/** /**

View File

@ -103,11 +103,47 @@ class ShortcodeParser extends Object {
$this->shortcodes = array(); $this->shortcodes = array();
} }
/**
* Call a shortcode and return its replacement text
* Returns false if the shortcode isn't registered
*/
public function callShortcode($tag, $attributes, $content, $extra = array()) { public function callShortcode($tag, $attributes, $content, $extra = array()) {
if (!isset($this->shortcodes[$tag])) return false; if (!$tag || !isset($this->shortcodes[$tag])) return false;
return call_user_func($this->shortcodes[$tag], $attributes, $content, $this, $tag, $extra); return call_user_func($this->shortcodes[$tag], $attributes, $content, $this, $tag, $extra);
} }
/**
* Return the text to insert in place of a shoprtcode.
* Behaviour in the case of missing shortcodes depends on the setting of ShortcodeParser::$error_behavior.
* @param $tag A map containing the the following keys:
* - 'open': The name of the tag
* - 'attrs': Attributes of the tag
* - 'content': Content of the tag
* @param $extra Extra-meta data
* @param $isHTMLAllowed A boolean indicating whether it's okay to insert HTML tags into the result
*/
function getShortcodeReplacementText($tag, $extra = array(), $isHTMLAllowed = true) {
$content = $this->callShortcode($tag['open'], $tag['attrs'], $tag['content'], $extra);
// Missing tag
if ($content === false) {
if(ShortcodeParser::$error_behavior == ShortcodeParser::ERROR) {
user_error('Unknown shortcode tag '.$tag['open'], E_USER_ERRROR);
}
else if (self::$error_behavior == self::WARN && $isHTMLAllowed) {
$content = '<strong class="warning">'.$tag['text'].'</strong>';
}
else if(ShortcodeParser::$error_behavior == ShortcodeParser::STRIP) {
return '';
}
else {
return $tag['text'];
}
}
return $content;
}
// -------------------------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------------------------
protected function removeNode($node) { protected function removeNode($node) {
@ -207,6 +243,7 @@ class ShortcodeParser extends Object {
protected function extractTags($content) { protected function extractTags($content) {
$tags = array(); $tags = array();
// Step 1: perform basic regex scan of individual tags
if(preg_match_all(static::tagrx(), $content, $matches, PREG_SET_ORDER | PREG_OFFSET_CAPTURE)) { if(preg_match_all(static::tagrx(), $content, $matches, PREG_SET_ORDER | PREG_OFFSET_CAPTURE)) {
foreach($matches as $match) { foreach($matches as $match) {
// Ignore any elements // Ignore any elements
@ -236,8 +273,9 @@ class ShortcodeParser extends Object {
'escaped' => !empty($match['oesc'][0]) || !empty($match['cesc1'][0]) || !empty($match['cesc2'][0]) 'escaped' => !empty($match['oesc'][0]) || !empty($match['cesc1'][0]) || !empty($match['cesc2'][0])
); );
} }
} }
// Step 2: cluster open/close tag pairs into single entries
$i = count($tags); $i = count($tags);
while($i--) { while($i--) {
if(!empty($tags[$i]['close'])) { if(!empty($tags[$i]['close'])) {
@ -283,6 +321,17 @@ class ShortcodeParser extends Object {
} }
} }
// Step 3: remove any tags that don't have handlers registered
// Only do this if self::$error_behavior == self::LEAVE
// This is optional but speeds things up.
if(self::$error_behavior == self::LEAVE) {
foreach($tags as $i => $tag) {
if(empty($this->shortcodes[$tag['open']])) {
unset($tags[$i]);
}
}
}
return array_values($tags); return array_values($tags);
} }
@ -337,24 +386,11 @@ class ShortcodeParser extends Object {
if($tags) { if($tags) {
$node->nodeValue = $this->replaceTagsWithText($node->nodeValue, $tags, $node->nodeValue = $this->replaceTagsWithText($node->nodeValue, $tags,
function($idx, $tag) use ($parser, $extra){ function($idx, $tag) use ($parser, $extra) {
$content = $parser->callShortcode($tag['open'], $tag['attrs'], $tag['content'], $extra); return $parser->getShortcodeReplacementText($tag, $extra, false);
if ($content === false) {
if(ShortcodeParser::$error_behavior == ShortcodeParser::ERROR) {
user_error('Unknown shortcode tag '.$tag['open'], E_USER_ERRROR);
}
else if(ShortcodeParser::$error_behavior == ShortcodeParser::STRIP) {
return '';
}
else {
return $tag['text'];
}
} }
);
return $content; }
});
}
} }
} }
@ -372,10 +408,10 @@ class ShortcodeParser extends Object {
$content = $this->replaceTagsWithText($content, $tags, function($idx, $tag) use ($markerClass) { $content = $this->replaceTagsWithText($content, $tags, function($idx, $tag) use ($markerClass) {
return '<img class="'.$markerClass.'" data-tagid="'.$idx.'" />'; return '<img class="'.$markerClass.'" data-tagid="'.$idx.'" />';
}); });
} }
return array($content, $tags); return array($content, $tags);
} }
protected function findParentsForMarkers($nodes) { protected function findParentsForMarkers($nodes) {
$parents = array(); $parents = array();
@ -477,23 +513,7 @@ class ShortcodeParser extends Object {
* @param array $tag * @param array $tag
*/ */
protected function replaceMarkerWithContent($node, $tag) { protected function replaceMarkerWithContent($node, $tag) {
$content = false; $content = $this->getShortcodeReplacementText($tag);
if($tag['open']) $content = $this->callShortcode($tag['open'], $tag['attrs'], $tag['content']);
if ($content === false) {
if(self::$error_behavior == self::ERROR) {
user_error('Unknown shortcode tag '.$tag['open'], E_USER_ERRROR);
}
if (self::$error_behavior == self::WARN) {
$content = '<strong class="warning">'.$tag['text'].'</strong>';
}
else if (self::$error_behavior == self::LEAVE) {
$content = $tag['text'];
}
else {
// self::$error_behavior == self::STRIP - NOP
}
}
if ($content) { if ($content) {
$parsed = Injector::inst()->create('HTMLValue', $content); $parsed = Injector::inst()->create('HTMLValue', $content);
@ -567,8 +587,21 @@ class ShortcodeParser extends Object {
$this->replaceMarkerWithContent($shortcode, $tag); $this->replaceMarkerWithContent($shortcode, $tag);
} }
return $htmlvalue->getContent(); $content = $htmlvalue->getContent();
// Clean up any marker classes left over, for example, those injected into <script> tags
$parser = $this;
$content = preg_replace_callback(
// Not a general-case parser; assumes that the HTML generated in replaceElementTagsWithMarkers()
// hasn't been heavily modified
'/<img[^>]+class="'.preg_quote(self::$marker_class).'"[^>]+data-tagid="([^"]+)"[^>]+>/i',
function ($matches) use ($tags, $parser) {
$tag = $tags[$matches[1]];
return $parser->getShortcodeReplacementText($tag);
},
$content
);
return $content;
} }
} }

View File

@ -18,7 +18,7 @@
// TODO .middleColumn styling should probably be theme specific (eg cms ui will look different than blackcandy) // TODO .middleColumn styling should probably be theme specific (eg cms ui will look different than blackcandy)
// so we should move this style into the cms and black candy files // so we should move this style into the cms and black candy files
min-width: 510px; min-width: 510px;
max-width: 600px; // Capped width. 600px is about the average size of a preview split view max-width: $grid-x * 87; // Capped width to line up with text fields
width:100%; width:100%;
margin-left:0; margin-left:0;
clear:both; clear:both;

View File

@ -129,9 +129,10 @@ class ChangePasswordForm extends Form {
_t( _t(
'Member.INVALIDNEWPASSWORD', 'Member.INVALIDNEWPASSWORD',
"We couldn't accept that password: {password}", "We couldn't accept that password: {password}",
array('password' => nl2br("\n".$isValid->starredList())) array('password' => nl2br("\n".Convert::raw2xml($isValid->starredList())))
), ),
"bad" "bad",
false
); );
// redirect back to the form, instead of using redirectBack() which could send the user elsewhere. // redirect back to the form, instead of using redirectBack() which could send the user elsewhere.

View File

@ -59,7 +59,9 @@ class Member extends DataObject implements TemplateGlobalProvider {
private static $has_one = array(); private static $has_one = array();
private static $has_many = array(); private static $has_many = array(
'LoggedPasswords' => 'MemberPassword',
);
private static $many_many = array(); private static $many_many = array();
@ -879,6 +881,26 @@ class Member extends DataObject implements TemplateGlobalProvider {
} }
} }
public function onAfterDelete() {
parent::onAfterDelete();
//prevent orphaned records remaining in the DB
$this->deletePasswordLogs();
}
/**
* Delete the MemberPassword objects that are associated to this user
*
* @return self
*/
protected function deletePasswordLogs() {
foreach ($this->LoggedPasswords() as $password) {
$password->delete();
$password->destroy();
}
return $this;
}
/** /**
* If any admin groups are requested, deny the whole save operation. * If any admin groups are requested, deny the whole save operation.
* *

View File

@ -1118,7 +1118,7 @@ class Security extends Controller implements TemplateGlobalProvider {
/** /**
* Defines global accesible templates variables. * Defines global accessible templates variables.
* *
* @return array * @return array
*/ */

View File

@ -22,7 +22,9 @@ class i18nTextCollectorTask extends BuildTask {
parent::init(); parent::init();
$canAccess = (Director::isDev() || Director::is_cli() || Permission::check("ADMIN")); $canAccess = (Director::isDev() || Director::is_cli() || Permission::check("ADMIN"));
if(!$canAccess) return Security::permissionFailure($this); if(!$canAccess) {
return Security::permissionFailure($this);
}
} }
/** /**
@ -31,13 +33,50 @@ class i18nTextCollectorTask extends BuildTask {
* and write the resultant files in the lang folder of each module. * and write the resultant files in the lang folder of each module.
* *
* @uses DataObject->collectI18nStatics() * @uses DataObject->collectI18nStatics()
*
* @param SS_HTTPRequest $request
*/ */
public function run($request) { public function run($request) {
increase_time_limit_to(); increase_time_limit_to();
$c = new i18nTextCollector($request->getVar('locale')); $collector = i18nTextCollector::create($request->getVar('locale'));
$writer = $request->getVar('writer');
if($writer) $c->setWriter(new $writer()); $merge = $this->getIsMerge($request);
$restrictModules = ($request->getVar('module')) ? explode(',', $request->getVar('module')) : null;
return $c->run($restrictModules, (bool)$request->getVar('merge')); // Custom writer
$writerName = $request->getVar('writer');
if($writerName) {
$writer = Injector::inst()->get($writerName);
$collector->setWriter($writer);
}
// Get restrictions
$restrictModules = ($request->getVar('module'))
? explode(',', $request->getVar('module'))
: null;
$collector->run($restrictModules, $merge);
Debug::message(__CLASS__ . " completed!", false);
}
/**
* Check if we should merge
*
* @param SS_HTTPRequest $request
*/
protected function getIsMerge($request) {
$merge = $request->getVar('merge');
// Default to false if not given
if(!isset($merge)) {
Deprecation::notice(
"4.0",
"merge will be enabled by default in 4.0. Please use merge=false if you do not want to merge."
);
return false;
}
// merge=0 or merge=false will disable merge
return !in_array($merge, array('0', 'false'));
} }
} }

View File

View File

@ -0,0 +1 @@
<?php

View File

@ -0,0 +1 @@
<p></p>

View File

@ -0,0 +1 @@
<?php

View File

@ -0,0 +1 @@
<?php

View File

@ -0,0 +1,2 @@
<?php

View File

@ -442,13 +442,11 @@ YAML;
$html = file_get_contents($templateFilePath); $html = file_get_contents($templateFilePath);
$matches = $c->collectFromTemplate($html, 'mymodule', 'RandomNamespace'); $matches = $c->collectFromTemplate($html, 'mymodule', 'RandomNamespace');
/* $this->assertArrayHasKey('RandomNamespace.LAYOUTTEMPLATENONAMESPACE', $matches);
$this->assertArrayHasKey('i18nTestModule.ss.LAYOUTTEMPLATENONAMESPACE', $matches);
$this->assertEquals( $this->assertEquals(
$matches['i18nTestModule.ss.LAYOUTTEMPLATENONAMESPACE'], $matches['RandomNamespace.LAYOUTTEMPLATENONAMESPACE'],
array('Layout Template no namespace') array('Layout Template no namespace')
); );
*/
$this->assertArrayHasKey('RandomNamespace.SPRINTFNONAMESPACE', $matches); $this->assertArrayHasKey('RandomNamespace.SPRINTFNONAMESPACE', $matches);
$this->assertEquals( $this->assertEquals(
$matches['RandomNamespace.SPRINTFNONAMESPACE'], $matches['RandomNamespace.SPRINTFNONAMESPACE'],
@ -464,85 +462,57 @@ YAML;
$matches['i18nTestModule.SPRINTFNAMESPACE'], $matches['i18nTestModule.SPRINTFNAMESPACE'],
array('My replacement: %s') array('My replacement: %s')
); );
$this->assertArrayHasKey('i18nTestModule.WITHNAMESPACE', $matches);
$this->assertEquals( // Includes should not automatically inject translations into parent templates
$matches['i18nTestModule.WITHNAMESPACE'], $this->assertArrayNotHasKey('i18nTestModule.WITHNAMESPACE', $matches);
array('Include Entity with Namespace') $this->assertArrayNotHasKey('i18nTestModuleInclude.ss.NONAMESPACE', $matches);
); $this->assertArrayNotHasKey('i18nTestModuleInclude.ss.SPRINTFINCLUDENAMESPACE', $matches);
$this->assertArrayHasKey('i18nTestModuleInclude.ss.NONAMESPACE', $matches); $this->assertArrayNotHasKey('i18nTestModuleInclude.ss.SPRINTFINCLUDENONAMESPACE', $matches);
$this->assertEquals(
$matches['i18nTestModuleInclude.ss.NONAMESPACE'],
array('Include Entity without Namespace')
);
$this->assertArrayHasKey('i18nTestModuleInclude.ss.SPRINTFINCLUDENAMESPACE', $matches);
$this->assertEquals(
$matches['i18nTestModuleInclude.ss.SPRINTFINCLUDENAMESPACE'],
array('My include replacement: %s')
);
$this->assertArrayHasKey('i18nTestModuleInclude.ss.SPRINTFINCLUDENONAMESPACE', $matches);
$this->assertEquals(
$matches['i18nTestModuleInclude.ss.SPRINTFINCLUDENONAMESPACE'],
array('My include replacement no namespace: %s')
);
} }
public function testCollectFromThemesTemplates() { public function testCollectFromThemesTemplates() {
$c = new i18nTextCollector(); $c = new i18nTextCollector();
$theme = Config::inst()->get('SSViewer', 'theme');
Config::inst()->update('SSViewer', 'theme', 'testtheme1'); Config::inst()->update('SSViewer', 'theme', 'testtheme1');
$templateFilePath = $this->alternateBasePath . '/themes/testtheme1/templates/Layout/i18nTestTheme1.ss'; // Collect from layout
$html = file_get_contents($templateFilePath); $layoutFilePath = $this->alternateBasePath . '/themes/testtheme1/templates/Layout/i18nTestTheme1.ss';
$matches = $c->collectFromTemplate($html, 'themes/testtheme1', 'i18nTestTheme1.ss'); $layoutHTML = file_get_contents($layoutFilePath);
$layoutMatches = $c->collectFromTemplate($layoutHTML, 'themes/testtheme1', 'i18nTestTheme1.ss');
// all entities from i18nTestTheme1.ss // all entities from i18nTestTheme1.ss
$this->assertEquals( $this->assertEquals(
$matches['i18nTestTheme1.LAYOUTTEMPLATE'], array(
array('Theme1 Layout Template') 'i18nTestTheme1.LAYOUTTEMPLATE'
=> array('Theme1 Layout Template'),
'i18nTestTheme1.SPRINTFNAMESPACE'
=> array('Theme1 My replacement: %s'),
'i18nTestTheme1.ss.LAYOUTTEMPLATENONAMESPACE'
=> array('Theme1 Layout Template no namespace'),
'i18nTestTheme1.ss.SPRINTFNONAMESPACE'
=> array('Theme1 My replacement no namespace: %s'),
),
$layoutMatches
); );
$this->assertArrayHasKey('i18nTestTheme1.ss.LAYOUTTEMPLATENONAMESPACE', $matches); // Collect from include
$this->assertEquals( $includeFilePath = $this->alternateBasePath . '/themes/testtheme1/templates/Includes/i18nTestTheme1Include.ss';
$matches['i18nTestTheme1.ss.LAYOUTTEMPLATENONAMESPACE'], $includeHTML = file_get_contents($includeFilePath);
array('Theme1 Layout Template no namespace') $includeMatches = $c->collectFromTemplate($includeHTML, 'themes/testtheme1', 'i18nTestTheme1Include.ss');
);
$this->assertEquals(
$matches['i18nTestTheme1.SPRINTFNAMESPACE'],
array('Theme1 My replacement: %s')
);
$this->assertArrayHasKey('i18nTestTheme1.ss.SPRINTFNONAMESPACE', $matches);
$this->assertEquals(
$matches['i18nTestTheme1.ss.SPRINTFNONAMESPACE'],
array('Theme1 My replacement no namespace: %s')
);
// all entities from i18nTestTheme1Include.ss // all entities from i18nTestTheme1Include.ss
$this->assertEquals( $this->assertEquals(
$matches['i18nTestTheme1Include.WITHNAMESPACE'], array(
array('Theme1 Include Entity with Namespace') 'i18nTestTheme1Include.SPRINTFINCLUDENAMESPACE'
=> array('Theme1 My include replacement: %s'),
'i18nTestTheme1Include.WITHNAMESPACE'
=> array('Theme1 Include Entity with Namespace'),
'i18nTestTheme1Include.ss.NONAMESPACE'
=> array('Theme1 Include Entity without Namespace'),
'i18nTestTheme1Include.ss.SPRINTFINCLUDENONAMESPACE'
=> array('Theme1 My include replacement no namespace: %s')
),
$includeMatches
); );
$this->assertArrayHasKey('i18nTestTheme1Include.ss.NONAMESPACE', $matches);
$this->assertEquals(
$matches['i18nTestTheme1Include.ss.NONAMESPACE'],
array('Theme1 Include Entity without Namespace')
);
$this->assertEquals(
$matches['i18nTestTheme1Include.SPRINTFINCLUDENAMESPACE'],
array('Theme1 My include replacement: %s')
);
$this->assertArrayHasKey('i18nTestTheme1Include.ss.SPRINTFINCLUDENONAMESPACE', $matches);
$this->assertEquals(
$matches['i18nTestTheme1Include.ss.SPRINTFINCLUDENONAMESPACE'],
array('Theme1 My include replacement no namespace: %s')
);
Config::inst()->update('SSViewer', 'theme', $theme);
} }
public function testCollectMergesWithExisting() { public function testCollectMergesWithExisting() {
@ -714,4 +684,163 @@ YAML;
); );
} }
/**
* Test that duplicate keys are resolved to the appropriate modules
*/
public function testResolveDuplicates() {
$collector = new i18nTextCollectorTest_Collector();
// Dummy data as collected
$data1 = array(
'framework' => array(
'DataObject.PLURALNAME' => array('Data Objects'),
'DataObject.SINGULARNAME' => array('Data Object')
),
'mymodule' => array(
'DataObject.PLURALNAME' => array('Ignored String'),
'DataObject.STREETNAME' => array('Shortland Street')
)
);
$expected = array(
'framework' => array(
'DataObject.PLURALNAME' => array('Data Objects'),
// Because DataObject is in framework module
'DataObject.SINGULARNAME' => array('Data Object')
),
'mymodule' => array(
// Because this key doesn't exist in framework strings
'DataObject.STREETNAME' => array('Shortland Street')
)
);
$resolved = $collector->resolveDuplicateConflicts_Test($data1);
$this->assertEquals($expected, $resolved);
// Test getConflicts
$data2 = array(
'module1' => array(
'DataObject.ONE' => array('One'),
'DataObject.TWO' => array('Two'),
'DataObject.THREE' => array('Three'),
),
'module2' => array(
'DataObject.THREE' => array('Three'),
),
'module3' => array(
'DataObject.TWO' => array('Two'),
'DataObject.THREE' => array('Three'),
)
);
$conflictsA = $collector->getConflicts_Test($data2);
sort($conflictsA);
$this->assertEquals(
array('DataObject.THREE', 'DataObject.TWO'),
$conflictsA
);
// Removing module3 should remove a conflict
unset($data2['module3']);
$conflictsB = $collector->getConflicts_Test($data2);
$this->assertEquals(
array('DataObject.THREE'),
$conflictsB
);
}
/**
* Test ability for textcollector to detect modules
*/
public function testModuleDetection() {
$collector = new i18nTextCollectorTest_Collector();
$modules = $collector->getModules_Test($this->alternateBasePath);
$this->assertEquals(
array(
'i18nnonstandardmodule',
'i18nothermodule',
'i18ntestmodule',
'themes/testtheme1',
'themes/testtheme2'
),
$modules
);
}
/**
* Test that text collector can detect module file lists properly
*/
public function testModuleFileList() {
$collector = new i18nTextCollectorTest_Collector();
$collector->basePath = $this->alternateBasePath;
$collector->baseSavePath = $this->alternateBaseSavePath;
// Non-standard modules can't be safely filtered, so just index everything
$nonStandardFiles = $collector->getFileListForModule_Test('i18nnonstandardmodule');
$nonStandardRoot = $this->alternateBasePath . '/i18nnonstandardmodule';
$this->assertEquals(3, count($nonStandardFiles));
$this->assertArrayHasKey("{$nonStandardRoot}/_config.php", $nonStandardFiles);
$this->assertArrayHasKey("{$nonStandardRoot}/phpfile.php", $nonStandardFiles);
$this->assertArrayHasKey("{$nonStandardRoot}/template.ss", $nonStandardFiles);
// Normal module should have predictable dir structure
$testFiles = $collector->getFileListForModule_Test('i18ntestmodule');
$testRoot = $this->alternateBasePath . '/i18ntestmodule';
$this->assertEquals(6, count($testFiles));
// Code in code folder is detected
$this->assertArrayHasKey("{$testRoot}/code/i18nTestModule.php", $testFiles);
$this->assertArrayHasKey("{$testRoot}/code/subfolder/_config.php", $testFiles);
$this->assertArrayHasKey("{$testRoot}/code/subfolder/i18nTestSubModule.php", $testFiles);
// Templates in templates folder is detected
$this->assertArrayHasKey("{$testRoot}/templates/Includes/i18nTestModuleInclude.ss", $testFiles);
$this->assertArrayHasKey("{$testRoot}/templates/Layout/i18nTestModule.ss", $testFiles);
$this->assertArrayHasKey("{$testRoot}/templates/i18nTestModule.ss", $testFiles);
// Standard modules with code in odd places should only have code in those directories detected
$otherFiles = $collector->getFileListForModule_Test('i18nothermodule');
$otherRoot = $this->alternateBasePath . '/i18nothermodule';
$this->assertEquals(3, count($otherFiles));
// Only detect well-behaved files
$this->assertArrayHasKey("{$otherRoot}/code/i18nOtherModule.php", $otherFiles);
$this->assertArrayHasKey("{$otherRoot}/code/i18nTestModuleDecorator.php", $otherFiles);
$this->assertArrayHasKey("{$otherRoot}/templates/i18nOtherModule.ss", $otherFiles);
// Themes should detect all ss files only
$theme1Files = $collector->getFileListForModule_Test('themes/testtheme1');
$theme1Root = $this->alternateBasePath . '/themes/testtheme1/templates';
$this->assertEquals(3, count($theme1Files));
// Find only ss files
$this->assertArrayHasKey("{$theme1Root}/Includes/i18nTestTheme1Include.ss", $theme1Files);
$this->assertArrayHasKey("{$theme1Root}/Layout/i18nTestTheme1.ss", $theme1Files);
$this->assertArrayHasKey("{$theme1Root}/i18nTestTheme1Main.ss", $theme1Files);
// Only 1 file here
$theme2Files = $collector->getFileListForModule_Test('themes/testtheme2');
$this->assertEquals(1, count($theme2Files));
$this->assertArrayHasKey(
$this->alternateBasePath . '/themes/testtheme2/templates/i18nTestTheme2.ss',
$theme2Files
);
}
}
/**
* Assist with testing of specific protected methods
*/
class i18nTextCollectorTest_Collector extends i18nTextCollector implements TestOnly {
public function getModules_Test($directory) {
return $this->getModules($directory);
}
public function resolveDuplicateConflicts_Test($entitiesByModule) {
return $this->resolveDuplicateConflicts($entitiesByModule);
}
public function getFileListForModule_Test($module) {
return parent::getFileListForModule($module);
}
public function getConflicts_Test($entitiesByModule) {
return parent::getConflicts($entitiesByModule);
}
} }

View File

@ -211,6 +211,37 @@ class ShortcodeParserTest extends SapphireTest {
); );
} }
public function testShortcodesInsideScriptTag() {
$this->assertEqualsIgnoringWhitespace(
'<script>hello</script>',
$this->parser->parse('<script>[test_shortcode]hello[/test_shortcode]</script>')
);
}
public function testNumericShortcodes() {
$this->assertEqualsIgnoringWhitespace(
'[2]',
$this->parser->parse('[2]')
);
$this->assertEqualsIgnoringWhitespace(
'<script>[2]</script>',
$this->parser->parse('<script>[2]</script>')
);
$this->parser->register('2', function($attributes, $content, $this, $tag, $extra) {
return 'this is 2';
});
$this->assertEqualsIgnoringWhitespace(
'this is 2',
$this->parser->parse('[2]')
);
$this->assertEqualsIgnoringWhitespace(
'<script>this is 2</script>',
$this->parser->parse('<script>[2]</script>')
);
}
public function testExtraContext() { public function testExtraContext() {
$this->parser->parse('<a href="[test_shortcode]">Test</a>'); $this->parser->parse('<a href="[test_shortcode]">Test</a>');

View File

@ -172,6 +172,13 @@ class MemberTest extends FunctionalTest {
$this->assertInstanceOf('DataObject', $passwords->current()); $this->assertInstanceOf('DataObject', $passwords->current());
$this->assertTrue($passwords->current()->checkPassword('1nitialPassword'), $this->assertTrue($passwords->current()->checkPassword('1nitialPassword'),
"Password 1nitialPassword not found in MemberRecord"); "Password 1nitialPassword not found in MemberRecord");
//check we don't retain orphaned records when a member is deleted
$member->delete();
$passwords = MemberPassword::get()->filter('MemberID', $member->OldID);
$this->assertCount(0, $passwords);
} }
/** /**