mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Merge remote-tracking branch 'origin/3.0'
This commit is contained in:
commit
3bce3550d3
@ -193,7 +193,6 @@ form.small .field input.text, form.small .field textarea, form.small .field sele
|
||||
.cms input.loading .ui-icon, .cms button.loading .ui-icon, .cms input.ui-state-default.loading .ui-icon, .cms .ui-widget-content input.ui-state-default.loading .ui-icon, .cms .ui-widget-header input.ui-state-default.loading .ui-icon { background: transparent url(../../images/network-save.gif) no-repeat 0 0; }
|
||||
.cms input.loading.ss-ui-action-constructive .ui-icon, .cms button.loading.ss-ui-action-constructive .ui-icon { background: transparent url(../../images/network-save-constructive.gif) no-repeat 0 0; }
|
||||
.cms .ss-ui-button { margin-top: 0px; font-weight: bold; text-decoration: none; line-height: 16px; color: #393939; border: 1px solid #c0c0c2; border-bottom: 1px solid #a6a6a9; cursor: pointer; background-color: #e6e6e6; white-space: nowrap; background: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2Q5ZDlkOSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(100%, #d9d9d9)); background: -webkit-linear-gradient(#ffffff, #d9d9d9); background: -moz-linear-gradient(#ffffff, #d9d9d9); background: -o-linear-gradient(#ffffff, #d9d9d9); background: linear-gradient(#ffffff, #d9d9d9); text-shadow: white 0 1px 1px; /* constructive */ /* destructive */ }
|
||||
.cms .ss-ui-button.buttonset { margin: 0 -1px; }
|
||||
.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+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2U2ZTZlNiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(100%, #e6e6e6)); background: -webkit-linear-gradient(#ffffff, #e6e6e6); background: -moz-linear-gradient(#ffffff, #e6e6e6); background: -o-linear-gradient(#ffffff, #e6e6e6); background: linear-gradient(#ffffff, #e6e6e6); -webkit-box-shadow: 0 0 5px #b3b3b3; -moz-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+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2U2ZTZlNiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(100%, #e6e6e6)); background: -webkit-linear-gradient(#ffffff, #e6e6e6); background: -moz-linear-gradient(#ffffff, #e6e6e6); background: -o-linear-gradient(#ffffff, #e6e6e6); background: linear-gradient(#ffffff, #e6e6e6); -webkit-box-shadow: 0 0 5px #b3b3b3 inset; -moz-box-shadow: 0 0 5px #b3b3b3 inset; box-shadow: 0 0 5px #b3b3b3 inset; }
|
||||
.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+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzkzYmU0MiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzFmOTQzMyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #93be42), color-stop(100%, #1f9433)); background: -webkit-linear-gradient(#93be42, #1f9433); background: -moz-linear-gradient(#93be42, #1f9433); background: -o-linear-gradient(#93be42, #1f9433); background: linear-gradient(#93be42, #1f9433); text-shadow: #1c872f 0 -1px -1px; }
|
||||
@ -206,6 +205,8 @@ form.small .field input.text, form.small .field textarea, form.small .field sele
|
||||
.cms .ss-ui-button.ss-ui-action-minor:hover { text-decoration: none; color: #1f1f1f; }
|
||||
.cms .ss-ui-button.ss-ui-action-minor:focus, .cms .ss-ui-button.ss-ui-action-minor:active { text-decoration: none; color: #525252; }
|
||||
.cms .ss-ui-button.ss-ui-button-loading { opacity: 0.8; }
|
||||
.cms .ss-ui-buttonset .ui-button { margin-left: -1px; }
|
||||
.cms .ss-ui-buttonset { margin-left: 1px; }
|
||||
.cms .ss-ui-loading-icon { background: url(../../images/network-save.gif) no-repeat; display: block; width: 16px; height: 16px; }
|
||||
|
||||
/** ---------------------------------------------------- Grouped form fields ---------------------------------------------------- */
|
||||
|
@ -446,7 +446,7 @@ jQuery.noConflict();
|
||||
* Requires HTML5 sessionStorage support.
|
||||
*/
|
||||
saveTabState: function() {
|
||||
if(typeof(window.sessionStorage)=="undefined") return;
|
||||
if(typeof(window.sessionStorage)=="undefined" || window.sessionStorage == null) return;
|
||||
|
||||
var selectedTabs = [], url = this._tabStateUrl();
|
||||
this.find('.cms-tabset,.ss-tabset').each(function(i, el) {
|
||||
@ -464,7 +464,7 @@ jQuery.noConflict();
|
||||
* Requires HTML5 sessionStorage support.
|
||||
*/
|
||||
restoreTabState: function() {
|
||||
if(typeof(window.sessionStorage)=="undefined") return;
|
||||
if(typeof(window.sessionStorage)=="undefined" || window.sessionStorage == null) return;
|
||||
|
||||
var self = this, url = this._tabStateUrl(),
|
||||
data = window.sessionStorage.getItem('tabs-' + url),
|
||||
|
@ -320,10 +320,6 @@ form.small .field, .field.small {
|
||||
|
||||
@include text-shadow(lighten($color-button-generic, 20%) 0 1px 1px);
|
||||
|
||||
&.buttonset {
|
||||
margin: 0 -1px; // hack to avoid double borders
|
||||
}
|
||||
|
||||
&.ui-state-hover, &:hover {
|
||||
text-decoration: none;
|
||||
background-color: lighten($color-button-generic, 10%);
|
||||
@ -421,6 +417,16 @@ form.small .field, .field.small {
|
||||
opacity: 0.8;
|
||||
}
|
||||
}
|
||||
|
||||
.ss-ui-buttonset {
|
||||
.ui-button {
|
||||
margin-left: -1px;
|
||||
}
|
||||
}
|
||||
|
||||
.ss-ui-buttonset {
|
||||
margin-left: 1px;
|
||||
}
|
||||
|
||||
.ss-ui-loading-icon {
|
||||
background: url(../../images/network-save.gif) no-repeat;
|
||||
|
@ -920,8 +920,9 @@ class File extends DataObject {
|
||||
*/
|
||||
static function set_class_for_file_extension($exts, $class) {
|
||||
if(!is_array($exts)) $exts = array($exts);
|
||||
|
||||
foreach($exts as $ext) {
|
||||
if(ClassInfo::is_subclass_of($ext, 'File')) {
|
||||
if(is_subclass_of($ext, 'File')) {
|
||||
throw new InvalidArgumentException(
|
||||
sprintf('Class "%s" (for extension "%s") is not a valid subclass of File', $class, $ext)
|
||||
);
|
||||
|
@ -290,6 +290,7 @@ class DatetimeField_Readonly extends DatetimeField {
|
||||
function Field($properties = array()) {
|
||||
$valDate = $this->dateField->dataValue();
|
||||
$valTime = $this->timeField->dataValue();
|
||||
|
||||
if($valDate && $valTime) {
|
||||
$format = sprintf(
|
||||
$this->getConfig('datetimeorder'),
|
||||
@ -302,9 +303,9 @@ class DatetimeField_Readonly extends DatetimeField {
|
||||
$this->dateField->getLocale()
|
||||
);
|
||||
$val = $valueObj->toString($format);
|
||||
|
||||
} else {
|
||||
// TODO Localization
|
||||
$val = '<i>(not set)</i>';
|
||||
$val = sprintf('<em>%s</em>', _t('DatetimeField.NOTSET', 'Not set'));
|
||||
}
|
||||
|
||||
return "<span class=\"readonly\" id=\"" . $this->id() . "\">$val</span>";
|
||||
|
@ -37,6 +37,8 @@ class SelectionGroup extends CompositeField {
|
||||
|
||||
$count = 0;
|
||||
$firstSelected = $checked ="";
|
||||
$newItems = array();
|
||||
|
||||
foreach($items as $key => $item) {
|
||||
if(strpos($key,'//') !== false) {
|
||||
list($key,$title) = explode('//', $key,2);
|
||||
|
@ -1995,7 +1995,7 @@ class i18n extends Object implements TemplateGlobalProvider {
|
||||
// and the next invocation of include_by_locale() doesn't cause a new reparse.
|
||||
$adapter->addTranslation(
|
||||
array(
|
||||
'content' => array('_' => '_'),
|
||||
'content' => array($locale => $locale), // Cached by content hash, so needs to be locale dependent
|
||||
'locale' => $locale,
|
||||
'usetranslateadapter' => true
|
||||
)
|
||||
|
@ -1143,8 +1143,9 @@ class Member extends DataObject implements TemplateGlobalProvider {
|
||||
|
||||
$mainFields->removeByName('Salt');
|
||||
$mainFields->removeByName('NumVisit');
|
||||
$mainFields->removeByName('LastVisited');
|
||||
|
||||
|
||||
$mainFields->makeFieldReadonly('LastVisited');
|
||||
|
||||
$fields->removeByName('Subscriptions');
|
||||
|
||||
// Groups relation will get us into logical conflicts because
|
||||
@ -1214,7 +1215,7 @@ class Member extends DataObject implements TemplateGlobalProvider {
|
||||
)
|
||||
);
|
||||
$timeFormatField->setValue($this->TimeFormat);
|
||||
|
||||
|
||||
$this->extend('updateCMSFields', $fields);
|
||||
|
||||
return $fields;
|
||||
|
@ -1 +1 @@
|
||||
<input $AttributesHTML>
|
||||
<input $AttributesHTML />
|
@ -2,7 +2,7 @@
|
||||
<% if Options.Count %>
|
||||
<% loop Options %>
|
||||
<li class="$Class">
|
||||
<input id="$ID" class="checkbox" name="$Name" type="checkbox" value="$Value"<% if isChecked %> checked="checked"<% end_if %><% if isDisabled %> disabled="disabled"<% end_if %>>
|
||||
<input id="$ID" class="checkbox" name="$Name" type="checkbox" value="$Value"<% if isChecked %> checked="checked"<% end_if %><% if isDisabled %> disabled="disabled"<% end_if %> />
|
||||
<label for="$ID">$Title</label>
|
||||
</li>
|
||||
<% end_loop %>
|
||||
|
@ -1,2 +1,2 @@
|
||||
<input $AttributesHTML>
|
||||
<input type="hidden" name="MAX_FILE_SIZE" value="$MaxFileSize">
|
||||
<input $AttributesHTML />
|
||||
<input type="hidden" name="MAX_FILE_SIZE" value="$MaxFileSize" />
|
||||
|
@ -3,5 +3,5 @@
|
||||
<% if ButtonContent %>$ButtonContent<% else %>$Title<% end_if %>
|
||||
</button>
|
||||
<% else %>
|
||||
<input $AttributesHTML>
|
||||
<input $AttributesHTML />
|
||||
<% end_if %>
|
@ -5,5 +5,5 @@
|
||||
$Value
|
||||
</span>
|
||||
<% else %>
|
||||
<input $AttributesHTML>
|
||||
<input $AttributesHTML />
|
||||
<% end_if %>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<ul id="$ID" class="$extraClass"<% if Description %> title="$Description"<% end_if %>>
|
||||
<% loop Options %>
|
||||
<li class="$Class">
|
||||
<input id="$ID" class="radio" name="$Name" type="radio" value="$Value"<% if isChecked %> checked<% end_if %><% if isDisabled %> disabled<% end_if %>>
|
||||
<input id="$ID" class="radio" name="$Name" type="radio" value="$Value"<% if isChecked %> checked<% end_if %><% if isDisabled %> disabled<% end_if %> />
|
||||
<label for="$ID">$Title</label>
|
||||
</li>
|
||||
<% end_loop %>
|
||||
|
Loading…
x
Reference in New Issue
Block a user