Merge branch '3.1'

This commit is contained in:
Simon Welsh 2014-01-09 08:22:47 +13:00
commit 39d42e4ea3
30 changed files with 235 additions and 153 deletions

View File

@ -126,11 +126,11 @@ body, html { font-size: 12px; line-height: 16px; font-family: Arial, sans-serif;
.ui-widget-content, .ui-widget { color: #444444; font-size: 12px; font-family: Arial, sans-serif; border: 0; }
.ui-widget-header { background-color: #b0bec7; padding: 8px 8px 6px 8px; border-bottom: 2px solid #8399a7; background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2RkZTNlNyIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzkyYTViMiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #dde3e7), color-stop(100%, #92a5b2)); background-image: -webkit-linear-gradient(#dde3e7, #92a5b2); background-image: -moz-linear-gradient(#dde3e7, #92a5b2); background-image: -o-linear-gradient(#dde3e7, #92a5b2); background-image: linear-gradient(#dde3e7, #92a5b2); border-bottom: 3px solid #5c7382; padding: 8px; -webkit-border-radius: 0; -moz-border-radius: 0; -ms-border-radius: 0; -o-border-radius: 0; border-radius: 0; }
.ui-widget-header .ui-dialog-title { padding: 6px 0; text-shadow: #ced7dc 1px 1px 0; }
.ui-widget-header .ui-dialog-title { padding: 6px 10px; text-shadow: #ced7dc 1px 1px 0; }
.ui-widget-header a.ui-dialog-titlebar-close { position: absolute; top: -8px; right: -15px; width: 30px; height: 30px; z-index: 100000; }
.ui-widget-header a.ui-state-hover { border-color: transparent; background: transparent; }
.ui-widget-header a.ui-state-hover .ui-icon-closethick { background: url('../images/sprites-32x32-s972e408b05.png') 0 -216px no-repeat; }
.ui-widget-header .ui-icon-closethick { background: url('../images/sprites-32x32-s972e408b05.png') 0 -292px no-repeat; width: 30px; height: 30px; }
.ui-widget-header a.ui-state-hover .ui-icon-closethick { background: url('../images/sprites-32x32-s10286f549b.png') 0 -256px no-repeat; }
.ui-widget-header .ui-icon-closethick { background: url('../images/sprites-32x32-s10286f549b.png') 0 0 no-repeat; width: 30px; height: 30px; }
.ui-state-hover { cursor: pointer; }
@ -317,11 +317,11 @@ fieldset.switch-states.size_2 input:checked:nth-of-type(2) ~ .slide-button { lef
fieldset.switch-states.size_2 input:checked:nth-of-type(3) ~ .slide-button { left: 100%; }
fieldset.switch-states.size_2 input:checked:nth-of-type(4) ~ .slide-button { left: 150%; }
fieldset.switch-states.size_2 input:checked:nth-of-type(5) ~ .slide-button { left: 200%; }
fieldset.switch-states.size_3 label, fieldset.switch-states.size_3 .slide-button { width: 33.33333%; }
fieldset.switch-states.size_3 input:checked:nth-of-type(2) ~ .slide-button { left: 33.33333%; }
fieldset.switch-states.size_3 input:checked:nth-of-type(3) ~ .slide-button { left: 66.66667%; }
fieldset.switch-states.size_3 label, fieldset.switch-states.size_3 .slide-button { width: 33.333%; }
fieldset.switch-states.size_3 input:checked:nth-of-type(2) ~ .slide-button { left: 33.333%; }
fieldset.switch-states.size_3 input:checked:nth-of-type(3) ~ .slide-button { left: 66.667%; }
fieldset.switch-states.size_3 input:checked:nth-of-type(4) ~ .slide-button { left: 100%; }
fieldset.switch-states.size_3 input:checked:nth-of-type(5) ~ .slide-button { left: 133.33333%; }
fieldset.switch-states.size_3 input:checked:nth-of-type(5) ~ .slide-button { left: 133.333%; }
fieldset.switch-states.size_4 label, fieldset.switch-states.size_4 .slide-button { width: 25%; }
fieldset.switch-states.size_4 input:checked:nth-of-type(2) ~ .slide-button { left: 25%; }
fieldset.switch-states.size_4 input:checked:nth-of-type(3) ~ .slide-button { left: 50%; }
@ -372,7 +372,8 @@ body.cms { overflow: hidden; }
.cms-content-header h2 { font-size: 14px; font-weight: bold; margin: 0; margin-bottom: 8px; }
.cms-content-header h2 * { vertical-align: middle; }
.cms-content-header .cms-content-header-info { float: left; padding-top: 6px; }
.cms-content-header .cms-content-header-info > * { display: inline-block; }
.cms-content-header .cms-content-header-info * { display: inline-block; }
.cms-content-header .cms-content-header-info .section-icon { opacity: 0.2; margin-right: 4px; background-repeat: no-repeat; }
.cms-content-header .ss-ui-button { line-height: 24px; }
.cms-content-header .ss-ui-button .ui-button-text { line-height: 1.4; }
@ -515,10 +516,10 @@ body.cms { overflow: hidden; }
.cms-content-tools .field { /* Fields are more compressed in the sidebar compared to the main content editing window so the below alters the internal spacing of the fields so we can move that spacing to between the form fields rather than padding */ }
.cms-content-tools .field label { float: none; width: auto; font-size: 11px; padding: 0 8px 4px 0; }
.cms-content-tools .field .middleColumn { margin: 0; }
.cms-content-tools .field .description { margin-left: 0; }
.cms-content-tools .field input.text, .cms-content-tools .field select, .cms-content-tools .field textarea { padding: 5px; font-size: 11px; }
.cms-content-tools .field.checkbox { padding: 0 0 8px; }
.cms-content-tools .field.checkbox input { margin: 2px 0; }
.cms-content-tools .field .description { margin-left: 0; }
.cms-content-tools .fieldgroup .fieldgroup-field { padding: 0; }
.cms-content-tools .fieldgroup .fieldgroup-field .field { margin: 0; padding: 0; }
.cms-content-tools table { margin: 8px -4px; }
@ -688,7 +689,7 @@ body.cms-dialog { overflow: auto; background: url("../images/textures/bg_cms_mai
/** -------------------------------------------- Step labels -------------------------------------------- */
.step-label > * { display: inline-block; vertical-align: top; }
.step-label .flyout { height: 18px; font-size: 14px; font-weight: bold; -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; background-color: #667980; padding: 4px 3px 4px 6px; text-align: center; text-shadow: none; color: #fff; }
.step-label .arrow { height: 26px; width: 10px; background: url('../images/sprites-32x32-s972e408b05.png') 0 -256px no-repeat; margin-right: 4px; }
.step-label .arrow { height: 26px; width: 10px; background: url('../images/sprites-32x32-s10286f549b.png') 0 -296px no-repeat; margin-right: 4px; }
.step-label .title { height: 18px; padding: 4px; }
/** -------------------------------------------- Item Edit Form -------------------------------------------- */
@ -723,7 +724,7 @@ form.import-form label.left { width: 250px; }
/** -------------------------------------------- Page Edit Controller -------------------------------------------- */
/*.cms-container {
.CMSPageEditController, .CMSPageSettingsController, .CMSPageHistoryController {
// Fix pixel gap between nav tree and main page header
/* Fix pixel gap between nav tree and main page header */
margin-left: -1px; // Removed to close gap far right of right tabs?
}
}*/
@ -735,10 +736,10 @@ form.import-form label.left { width: 250px; }
/** -------------------------------------------- Buttons for FileUpload -------------------------------------------- */
.ss-uploadfield-item-edit-all .ui-button-text { padding-right: 0; }
.toggle-details-icon { background: url('../images/sprites-32x32-s972e408b05.png') 0 -407px no-repeat; }
.ss-uploadfield-item-edit-all .toggle-details-icon { background: url('../images/sprites-32x32-s972e408b05.png') 0 -349px no-repeat; display: inline-block; width: 8px; height: 8px; padding-left: 5px; }
.toggle-details-icon.opened { background: url('../images/sprites-32x32-s972e408b05.png') 0 -1121px no-repeat; }
.ss-uploadfield-item-edit-all .toggle-details-icon.opened { background: url('../images/sprites-32x32-s972e408b05.png') 0 -333px no-repeat; }
.toggle-details-icon { background: url('../images/sprites-32x32-s10286f549b.png') 0 -406px no-repeat; }
.ss-uploadfield-item-edit-all .toggle-details-icon { background: url('../images/sprites-32x32-s10286f549b.png') 0 -348px no-repeat; display: inline-block; width: 8px; height: 8px; padding-left: 5px; }
.toggle-details-icon.opened { background: url('../images/sprites-32x32-s10286f549b.png') 0 -1120px no-repeat; }
.ss-uploadfield-item-edit-all .toggle-details-icon.opened { background: url('../images/sprites-32x32-s10286f549b.png') 0 -332px no-repeat; }
/** -------------------------------------------- Hide preview toggle link by default. May be shown in IE7 stylesheet and forced to show with js if needed -------------------------------------------- */
.cms .Actions > .cms-preview-toggle-link, .cms .cms-navigator > .cms-preview-toggle-link { display: none; }
@ -763,10 +764,9 @@ form.import-form label.left { width: 250px; }
.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 a, .TreeDropdownField .treedropdownfield-panel .jstree .jstree-wholerow-real a { border-left-color: transparent !important; border-right-color: transparent !important; }
.cms .jstree .jstree-wholerow, .cms .TreeDropdownField .treedropdownfield-panel .jstree .jstree-wholerow, .TreeDropdownField .treedropdownfield-panel .cms .jstree .jstree-wholerow, .cms .jstree .jstree-wholerow ul, .cms .jstree .jstree-wholerow li, .cms .TreeDropdownField .treedropdownfield-panel .jstree .jstree-wholerow ul, .TreeDropdownField .treedropdownfield-panel .cms .jstree .jstree-wholerow ul, .cms .TreeDropdownField .treedropdownfield-panel .jstree .jstree-wholerow li, .TreeDropdownField .treedropdownfield-panel .cms .jstree .jstree-wholerow li, .cms .jstree .jstree-wholerow a, .cms .jstree .jstree-wholerow a:hover, .cms .TreeDropdownField .treedropdownfield-panel .jstree .jstree-wholerow a, .TreeDropdownField .treedropdownfield-panel .cms .jstree .jstree-wholerow a, .TreeDropdownField .treedropdownfield-panel .jstree .jstree-wholerow, .TreeDropdownField .treedropdownfield-panel .jstree .jstree-wholerow ul, .TreeDropdownField .treedropdownfield-panel .jstree .jstree-wholerow li, .TreeDropdownField .treedropdownfield-panel .jstree .jstree-wholerow a, .TreeDropdownField .treedropdownfield-panel .jstree .jstree-wholerow a:hover { margin: 0 !important; padding: 0 !important; }
.cms .jstree .jstree-wholerow, .TreeDropdownField .treedropdownfield-panel .jstree .jstree-wholerow { position: relative; z-index: 0; height: 0; background: transparent !important; }
.cms .jstree .jstree-wholerow ul, .cms .jstree .jstree-wholerow li, .TreeDropdownField .treedropdownfield-panel .jstree .jstree-wholerow ul, .TreeDropdownField .treedropdownfield-panel .jstree .jstree-wholerow li { background: transparent !important; width: 100%; }
.cms .jstree .jstree-wholerow a, .cms .jstree .jstree-wholerow a:hover, .TreeDropdownField .treedropdownfield-panel .jstree .jstree-wholerow a, .TreeDropdownField .treedropdownfield-panel .jstree .jstree-wholerow a:hover { text-indent: -9999px !important; width: 100%; border-right-width: 0px !important; border-left-width: 0px !important; }
.cms .jstree .jstree-wholerow, .TreeDropdownField .treedropdownfield-panel .jstree .jstree-wholerow { position: relative; z-index: 0; height: 0; margin: 0 !important; padding: 0 !important; background: transparent !important; }
.cms .jstree .jstree-wholerow ul, .cms .jstree .jstree-wholerow li, .TreeDropdownField .treedropdownfield-panel .jstree .jstree-wholerow ul, .TreeDropdownField .treedropdownfield-panel .jstree .jstree-wholerow li { margin: 0 !important; padding: 0 !important; background: transparent !important; width: 100%; }
.cms .jstree .jstree-wholerow a, .cms .jstree .jstree-wholerow a:hover, .TreeDropdownField .treedropdownfield-panel .jstree .jstree-wholerow a, .TreeDropdownField .treedropdownfield-panel .jstree .jstree-wholerow a:hover { margin: 0 !important; padding: 0 !important; text-indent: -9999px !important; width: 100%; border-right-width: 0px !important; border-left-width: 0px !important; }
.cms .jstree .jstree-wholerow ins, .cms .jstree .jstree-wholerow span, .cms .jstree .jstree-wholerow input, .TreeDropdownField .treedropdownfield-panel .jstree .jstree-wholerow ins, .TreeDropdownField .treedropdownfield-panel .jstree .jstree-wholerow span, .TreeDropdownField .treedropdownfield-panel .jstree .jstree-wholerow input { display: none !important; }
.cms .jstree .jstree-wholerow-span, .TreeDropdownField .treedropdownfield-panel .jstree .jstree-wholerow-span { position: absolute; left: 0; margin: 0px; padding: 0; height: 18px; border-width: 0; padding: 0; z-index: 0; }
.cms .jstree-apple.jstree-focused, .TreeDropdownField .treedropdownfield-panel .jstree-apple.jstree-focused { background: none; }
@ -782,9 +782,8 @@ form.import-form label.left { width: 250px; }
.cms .jstree-themeroller a, .TreeDropdownField .treedropdownfield-panel .jstree-themeroller a { padding: 0 2px; }
.cms .jstree-themeroller .ui-icon, .TreeDropdownField .treedropdownfield-panel .jstree-themeroller .ui-icon { overflow: visible; }
.cms .jstree-themeroller .jstree-no-icon, .TreeDropdownField .treedropdownfield-panel .jstree-themeroller .jstree-no-icon { display: none; }
.cms #jstree-marker, .cms .TreeDropdownField .treedropdownfield-panel #jstree-marker, .TreeDropdownField .treedropdownfield-panel .cms #jstree-marker, .cms #jstree-marker-line, .cms .TreeDropdownField .treedropdownfield-panel #jstree-marker-line, .TreeDropdownField .treedropdownfield-panel .cms #jstree-marker-line, .TreeDropdownField .treedropdownfield-panel #jstree-marker, .TreeDropdownField .treedropdownfield-panel #jstree-marker-line { padding: 0; margin: 0; overflow: hidden; position: absolute; top: -30px; background-repeat: no-repeat; display: none; }
.cms #jstree-marker, .TreeDropdownField .treedropdownfield-panel #jstree-marker { line-height: 10px; font-size: 12px; height: 12px; width: 8px; z-index: 10001; background-color: transparent; text-shadow: 1px 1px 1px white; color: black; }
.cms #jstree-marker-line, .TreeDropdownField .treedropdownfield-panel #jstree-marker-line { line-height: 0%; font-size: 1px; height: 1px; width: 100px; z-index: 10000; background-color: #456c43; cursor: pointer; border: 1px solid #eeeeee; border-left: 0; -moz-box-shadow: 0px 0px 2px #666; -webkit-box-shadow: 0px 0px 2px #666; box-shadow: 0px 0px 2px #666; -moz-border-radius: 1px; border-radius: 1px; -webkit-border-radius: 1px; }
.cms #jstree-marker, .TreeDropdownField .treedropdownfield-panel #jstree-marker { padding: 0; margin: 0; overflow: hidden; position: absolute; top: -30px; background-repeat: no-repeat; display: none; line-height: 10px; font-size: 12px; height: 12px; width: 8px; z-index: 10001; background-color: transparent; text-shadow: 1px 1px 1px white; color: black; }
.cms #jstree-marker-line, .TreeDropdownField .treedropdownfield-panel #jstree-marker-line { padding: 0; margin: 0; overflow: hidden; position: absolute; top: -30px; background-repeat: no-repeat; display: none; line-height: 0%; font-size: 1px; height: 1px; width: 100px; z-index: 10000; background-color: #456c43; cursor: pointer; border: 1px solid #eeeeee; border-left: 0; -moz-box-shadow: 0px 0px 2px #666; -webkit-box-shadow: 0px 0px 2px #666; box-shadow: 0px 0px 2px #666; -moz-border-radius: 1px; border-radius: 1px; -webkit-border-radius: 1px; }
.cms #vakata-contextmenu, .TreeDropdownField .treedropdownfield-panel #vakata-contextmenu { display: block; visibility: hidden; left: 0; top: -200px; position: absolute; margin: 0; padding: 0; min-width: 180px; background: #FFF; border: 1px solid silver; z-index: 10000; *width: 180px; -webkit-box-shadow: 0 0 10px #cccccc; -moz-box-shadow: 0 0 10px #cccccc; box-shadow: 0 0 10px #cccccc; }
.cms #vakata-contextmenu::before, .TreeDropdownField .treedropdownfield-panel #vakata-contextmenu::before { content: ""; display: block; /* reduce the damage in FF3.0 */ position: absolute; top: -10px; left: 24px; width: 0; border-width: 0 6px 10px 6px; border-color: #FFF transparent; border-style: solid; z-index: 10000; }
.cms #vakata-contextmenu::after, .TreeDropdownField .treedropdownfield-panel #vakata-contextmenu::after { content: ""; display: block; /* reduce the damage in FF3.0 */ position: absolute; top: -11px; left: 23px; width: 0; border-width: 0 7px 11px 7px; border-color: #CCC transparent; border-style: solid; }
@ -832,9 +831,8 @@ form.import-form label.left { width: 250px; }
.tree-holder.jstree-apple span.badge.status-deletedonlive, .tree-holder.jstree-apple span.badge.status-removedfromdraft, .cms-tree.jstree-apple span.badge.status-deletedonlive, .cms-tree.jstree-apple span.badge.status-removedfromdraft { color: #636363; border: 1px solid #E49393; background-color: #F2DADB; }
.tree-holder.jstree-apple span.badge.status-workflow-approval, .cms-tree.jstree-apple span.badge.status-workflow-approval { color: #56660C; border: 1px solid #7C8816; background-color: #DAE79A; }
.tree-holder.jstree-apple span.comment-count, .cms-tree.jstree-apple span.comment-count { clear: both; position: relative; text-transform: uppercase; display: inline-block; overflow: visible; padding: 0px 3px; font-size: 0.75em; line-height: 1em; margin-left: 3px; margin-right: 6px; -webkit-border-radius: 2px 2px; -moz-border-radius: 2px / 2px; border-radius: 2px / 2px; color: #7E7470; border: 1px solid #C9B800; background-color: #FFF0BC; }
.tree-holder.jstree-apple span.comment-count span.comment-count:before, .tree-holder.jstree-apple span.comment-count span.comment-count:after, .cms-tree.jstree-apple span.comment-count span.comment-count:before, .cms-tree.jstree-apple span.comment-count span.comment-count:after { content: ""; position: absolute; border-style: solid; /* reduce the damage in FF3.0 */ display: block; width: 0; }
.tree-holder.jstree-apple span.comment-count:before, .cms-tree.jstree-apple span.comment-count:before { bottom: -4px; /* value = - border-top-width - border-bottom-width */ left: 3px; /* controls horizontal position */ border-width: 4px 4px 0; border-color: #C9B800 transparent; }
.tree-holder.jstree-apple span.comment-count:after, .cms-tree.jstree-apple span.comment-count:after { bottom: -3px; /* value = - border-top-width - border-bottom-width */ left: 4px; /* value = (:before left) + (:before border-left) - (:after border-left) */ border-width: 3px 3px 0; border-color: #FFF0BC transparent; }
.tree-holder.jstree-apple span.comment-count:before, .cms-tree.jstree-apple span.comment-count:before { content: ""; position: absolute; border-style: solid; display: block; width: 0; bottom: -4px; /* value = - border-top-width - border-bottom-width */ left: 3px; /* controls horizontal position */ border-width: 4px 4px 0; border-color: #C9B800 transparent; }
.tree-holder.jstree-apple span.comment-count:after, .cms-tree.jstree-apple span.comment-count:after { content: ""; position: absolute; border-style: solid; /* reduce the damage in FF3.0 */ display: block; width: 0; bottom: -3px; /* value = - border-top-width - border-bottom-width */ left: 4px; /* value = (:before left) + (:before border-left) - (:after border-left) */ border-width: 3px 3px 0; border-color: #FFF0BC transparent; }
.tree-holder.jstree-apple .jstree-hovered, .cms-tree.jstree-apple .jstree-hovered { text-shadow: none; text-decoration: none; }
.tree-holder.jstree-apple .jstree-closed > ins, .cms-tree.jstree-apple .jstree-closed > ins { background-position: 0 0; }
.tree-holder.jstree-apple .jstree-open > ins, .cms-tree.jstree-apple .jstree-open > ins { background-position: -20px 0; }
@ -865,7 +863,7 @@ li.class-ErrorPage > a .jstree-pageicon { background-position: 0 -112px; }
.cms-logo span { font-weight: bold; font-size: 12px; line-height: 16px; padding: 2px 0; margin-left: 30px; }
.cms-login-status { border-top: 1px solid #19435c; padding: 8px 0 9.6px; line-height: 16px; font-size: 11px; }
.cms-login-status .logout-link { display: inline-block; height: 16px; width: 16px; float: left; margin: 0 8px 0 5px; background: url('../images/sprites-32x32-s972e408b05.png') 0 -1095px no-repeat; text-indent: -9999em; opacity: 0.9; }
.cms-login-status .logout-link { display: inline-block; height: 16px; width: 16px; float: left; margin: 0 8px 0 5px; background: url('../images/sprites-32x32-s10286f549b.png') 0 -1094px no-repeat; text-indent: -9999em; opacity: 0.9; }
.cms-login-status .logout-link:hover, .cms-login-status .logout-link:focus { opacity: 1; }
.cms-menu { z-index: 80; background: #b0bec7; width: 160px; -webkit-box-shadow: rgba(0, 0, 0, 0.9) 0 0 3px; -moz-box-shadow: rgba(0, 0, 0, 0.9) 0 0 3px; box-shadow: rgba(0, 0, 0, 0.9) 0 0 3px; }
@ -890,12 +888,12 @@ li.class-ErrorPage > a .jstree-pageicon { background-position: 0 -112px; }
.cms-menu-list li a .icon { display: block; position: absolute; top: 50%; margin-left: 4px; margin-top: -8px; filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=70); opacity: 0.7; }
.cms-menu-list li a .text { display: block; margin-left: 30px; }
.cms-menu-list li a .toggle-children { display: inline-block; float: right; width: 20px; height: 100%; cursor: pointer; }
.cms-menu-list li a .toggle-children .toggle-children-icon { display: inline-block; width: 8px; height: 8px; background: url('../images/sprites-32x32-s972e408b05.png') 0 -349px no-repeat; vertical-align: middle; }
.cms-menu-list li a .toggle-children.opened .toggle-children-icon { background: url('../images/sprites-32x32-s972e408b05.png') 0 -333px no-repeat; }
.cms-menu-list li a .toggle-children .toggle-children-icon { display: inline-block; width: 8px; height: 8px; background: url('../images/sprites-32x32-s10286f549b.png') 0 -348px no-repeat; vertical-align: middle; }
.cms-menu-list li a .toggle-children.opened .toggle-children-icon { background: url('../images/sprites-32x32-s10286f549b.png') 0 -332px no-repeat; }
.cms-menu-list li ul li a { border-top: 1px solid #b6c3cb; }
.cms-menu-list li.current a { color: white; text-shadow: #1e5270 0 -1px 0; border-top: 1px solid #55a4d2; border-bottom: 1px solid #236184; background-color: #338dc1; background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzMzOGRjMSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzI4NzA5OSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #338dc1), color-stop(100%, #287099)); background-image: -webkit-linear-gradient(#338dc1, #287099); background-image: -moz-linear-gradient(#338dc1, #287099); background-image: -o-linear-gradient(#338dc1, #287099); background-image: linear-gradient(#338dc1, #287099); }
.cms-menu-list li.current a .toggle-children .toggle-children-icon { background: url('../images/sprites-32x32-s972e408b05.png') 0 -407px no-repeat; }
.cms-menu-list li.current a .toggle-children.opened .toggle-children-icon { background: url('../images/sprites-32x32-s972e408b05.png') 0 -1121px no-repeat; }
.cms-menu-list li.current a .toggle-children .toggle-children-icon { background: url('../images/sprites-32x32-s10286f549b.png') 0 -406px no-repeat; }
.cms-menu-list li.current a .toggle-children.opened .toggle-children-icon { background: url('../images/sprites-32x32-s10286f549b.png') 0 -1120px no-repeat; }
.cms-menu-list li.current ul { border-top: none; display: block; }
.cms-menu-list li.current li { background-color: #287099; }
.cms-menu-list li.current li a { font-size: 11px; padding: 0 10px 0 40px; height: 32px; line-height: 32px; color: #e2f0f7; background: none; border-top: 1px solid #2f81b1; border-bottom: 1px solid #1e5270; }
@ -918,14 +916,14 @@ li.class-ErrorPage > a .jstree-pageicon { background-position: 0 -112px; }
.cms-content-controls.cms-preview-controls { z-index: 1; background: #eceff1; height: 30px; /* should be set in js Layout to match page actions */ padding: 12px 12px; }
.cms-content-controls .icon-view, .cms-content-controls .preview-selector.dropdown a.chzn-single { white-space: nowrap; }
.cms-content-controls .icon-view:before, .cms-content-controls .preview-selector.dropdown a.chzn-single:before { display: inline-block; float: left; content: ''; width: 23px; height: 17px; overflow: hidden; }
.cms-content-controls .icon-auto:before { background: url('../images/sprites-32x32-s972e408b05.png') 0 -108px no-repeat; }
.cms-content-controls .icon-desktop:before { background: url('../images/sprites-32x32-s972e408b05.png') 0 -81px no-repeat; }
.cms-content-controls .icon-tablet:before { background: url('../images/sprites-32x32-s972e408b05.png') 0 -162px no-repeat; }
.cms-content-controls .icon-mobile:before { background: url('../images/sprites-32x32-s972e408b05.png') 0 -189px no-repeat; }
.cms-content-controls .icon-split:before { background: url('../images/sprites-32x32-s972e408b05.png') 0 -135px no-repeat; }
.cms-content-controls .icon-edit:before { background: url('../images/sprites-32x32-s972e408b05.png') 0 -27px no-repeat; }
.cms-content-controls .icon-preview:before { background: url('../images/sprites-32x32-s972e408b05.png') 0 0 no-repeat; }
.cms-content-controls .icon-window:before { background: url('../images/sprites-32x32-s972e408b05.png') 0 -54px no-repeat; }
.cms-content-controls .icon-auto:before { background: url('../images/sprites-32x32-s10286f549b.png') 0 -148px no-repeat; }
.cms-content-controls .icon-desktop:before { background: url('../images/sprites-32x32-s10286f549b.png') 0 -121px no-repeat; }
.cms-content-controls .icon-tablet:before { background: url('../images/sprites-32x32-s10286f549b.png') 0 -202px no-repeat; }
.cms-content-controls .icon-mobile:before { background: url('../images/sprites-32x32-s10286f549b.png') 0 -229px no-repeat; }
.cms-content-controls .icon-split:before { background: url('../images/sprites-32x32-s10286f549b.png') 0 -175px no-repeat; }
.cms-content-controls .icon-edit:before { background: url('../images/sprites-32x32-s10286f549b.png') 0 -67px no-repeat; }
.cms-content-controls .icon-preview:before { background: url('../images/sprites-32x32-s10286f549b.png') 0 -40px no-repeat; }
.cms-content-controls .icon-window:before { background: url('../images/sprites-32x32-s10286f549b.png') 0 -94px no-repeat; }
.cms-content-controls .cms-navigator { width: 100%; }
.cms-content-controls .preview-selector.dropdown a.chzn-single { text-indent: -200px; }
.cms-content-controls .preview-selector { float: right; border-bottom: none; position: relative; -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; margin: 3px 0 0 4px; padding: 0; height: 28px; }
@ -1072,10 +1070,10 @@ visible. Added and removed with js in TabSet.js */ /***************************
.cms .ss-ui-action-tabset.action-menus.ss-tabset ul.ui-tabs-nav li a { text-shadow: white 0 1px 1px; color: #0073c1; font-size: 13px; font-weight: normal; line-height: 24px; padding: 0 25px 0 10px; /* Arrow */ }
.cms .ss-ui-action-tabset.action-menus.ss-tabset ul.ui-tabs-nav li a:hover, .cms .ss-ui-action-tabset.action-menus.ss-tabset ul.ui-tabs-nav li a:active { -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; outline: none; }
.cms .ss-ui-action-tabset.action-menus.ss-tabset ul.ui-tabs-nav li a:hover { text-shadow: white 0 10px 10px; color: #005b98; }
.cms .ss-ui-action-tabset.action-menus.ss-tabset ul.ui-tabs-nav li a:after { background: url('../images/sprites-32x32-s972e408b05.png') 0 -1189px no-repeat; border-bottom: 0; content: ""; display: inline-block; height: 16px; margin-left: 6px; width: 16px; }
.cms .ss-ui-action-tabset.action-menus.ss-tabset ul.ui-tabs-nav li a:hover:after { background: url('../images/sprites-32x32-s972e408b05.png') 0 -1163px no-repeat; }
.cms .ss-ui-action-tabset.action-menus.ss-tabset ul.ui-tabs-nav li.ui-state-active a:after { background: url('../images/sprites-32x32-s972e408b05.png') 0 -1215px no-repeat; }
.cms .ss-ui-action-tabset.action-menus.ss-tabset ul.ui-tabs-nav li.ui-state-active a:hover:after { background: url('../images/sprites-32x32-s972e408b05.png') 0 -1137px no-repeat; }
.cms .ss-ui-action-tabset.action-menus.ss-tabset ul.ui-tabs-nav li a:after { background: url('../images/sprites-32x32-s10286f549b.png') 0 -1188px no-repeat; border-bottom: 0; content: ""; display: inline-block; height: 16px; margin-left: 6px; width: 16px; }
.cms .ss-ui-action-tabset.action-menus.ss-tabset ul.ui-tabs-nav li a:hover:after { background: url('../images/sprites-32x32-s10286f549b.png') 0 -1162px no-repeat; }
.cms .ss-ui-action-tabset.action-menus.ss-tabset ul.ui-tabs-nav li.ui-state-active a:after { background: url('../images/sprites-32x32-s10286f549b.png') 0 -1214px no-repeat; }
.cms .ss-ui-action-tabset.action-menus.ss-tabset ul.ui-tabs-nav li.ui-state-active a:hover:after { background: url('../images/sprites-32x32-s10286f549b.png') 0 -1136px no-repeat; }
.cms .ss-ui-action-tabset.action-menus.ss-tabset .ui-tabs-panel { overflow: hidden; *zoom: 1; -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; border-top-right-radius: 3px; -moz-border-radius-bottomleft: 0; -webkit-border-bottom-left-radius: 0; border-bottom-left-radius: 0; -moz-border-radius-bottomright: 0; -webkit-border-bottom-right-radius: 0; border-bottom-right-radius: 0; /* Restyle for smaller area*/ clear: both; display: block; background-color: #eceff1; border: 1px solid #ccc; border-bottom: 1px solid #eceff1; margin: 0; margin-top: 2px; max-width: 250px; padding: 8px 0 2px; position: absolute; z-index: 1; min-width: 190px; }
.cms .ss-ui-action-tabset.action-menus.ss-tabset .ui-tabs-panel h3, .cms .ss-ui-action-tabset.action-menus.ss-tabset .ui-tabs-panel h4, .cms .ss-ui-action-tabset.action-menus.ss-tabset .ui-tabs-panel h5 { font-weight: bold; line-height: 16px; }
.cms .ss-ui-action-tabset.action-menus.ss-tabset .ui-tabs-panel h3 { font-size: 13px; }

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@ -108,7 +108,7 @@
}
});
$('.cms-panel.collapsed').entwine({
$('.cms-panel.collapsed .cms-panel-toggle').entwine({
onclick: function(e) {
this.expandPanel();
e.preventDefault();

View File

@ -842,6 +842,12 @@ jQuery.noConflict();
*/
$('.cms .cms-panel-link').entwine({
onclick: function(e) {
if($(this).hasClass('external-link')) {
e.stopPropagation();
return;
}
var href = this.attr('href'),
url = (href && !href.match(/^#/)) ? href : this.data('href'),
data = {pjax: this.data('pjaxTarget')};
@ -1007,7 +1013,7 @@ jQuery.noConflict();
* we can fix the height cropping.
*/
$('.cms .field.dropdown select, .cms .field select[multiple]').entwine({
$('.cms .field.dropdown select, .cms .field select[multiple], .fieldholder-small select.dropdown').entwine({
onmatch: function() {
if(this.is('.no-chzn')) {
this._super();

View File

@ -125,9 +125,15 @@ body.cms {
float:left;
padding-top: 6px;
& > * {
& * {
display: inline-block; // align back button and breadcrumbs
}
.section-icon {
opacity: 0.2;
margin-right: 4px;
background-repeat: no-repeat;
}
}
// Reset to default styles

View File

@ -5,7 +5,6 @@
* The styles are usually added through jstree.js on DOM load,
* but we need it earlier in order to correctly display the uninitialized tree.
*/
.cms, .TreeDropdownField .treedropdownfield-panel {
.jstree {
> ul > li {
@ -98,23 +97,23 @@
border-right-color: transparent !important;
}
}
%no-margin-padding{
margin: 0 !important;
padding: 0 !important;
}
.jstree-wholerow {
position: relative;
z-index: 0;
height: 0;
@extend %no-margin-padding;
margin: 0 !important;
padding: 0 !important;
background: transparent !important;
ul,li {
@extend %no-margin-padding;
margin: 0 !important;
padding: 0 !important;
background: transparent !important;
width: 100%;
}
a, a:hover{
@extend %no-margin-padding;
margin: 0 !important;
padding: 0 !important;
text-indent: -9999px !important;
width: 100%;
border-right-width: 0px !important;
@ -195,7 +194,7 @@
}
}
%jstree-marker-shared{
#jstree-marker {
padding: 0;
margin: 0;
overflow: hidden;
@ -203,9 +202,6 @@
top: -30px;
background-repeat: no-repeat;
display: none;
}
#jstree-marker {
@extend %jstree-marker-shared;
line-height: 10px;
font-size: 12px;
height: 12px;
@ -216,7 +212,13 @@
color: black;
}
#jstree-marker-line {
@extend %jstree-marker-shared;
padding: 0;
margin: 0;
overflow: hidden;
position: absolute;
top: -30px;
background-repeat: no-repeat;
display: none;
line-height: 0%;
font-size: 1px;
height: 1px;
@ -518,23 +520,25 @@
color: #7E7470;
border: 1px solid #C9B800;
background-color: #FFF0BC;
%pseudo-comment-shared{
&:before {
content:"";
position:absolute;
border-style:solid;
/* reduce the damage in FF3.0 */
display:block;
width:0;
}
&:before {
@extend %pseudo-comment-shared;
width:0;
bottom:-4px; /* value = - border-top-width - border-bottom-width */
left:3px; /* controls horizontal position */
border-width:4px 4px 0;
border-color:#C9B800 transparent;
}
&:after {
@extend %pseudo-comment-shared;
content:"";
position:absolute;
border-style:solid;
/* reduce the damage in FF3.0 */
display:block;
width:0;
bottom:-3px; /* value = - border-top-width - border-bottom-width */
left:4px; /* value = (:before left) + (:before border-left) - (:after border-left) */
border-width:3px 3px 0;

View File

@ -30,7 +30,7 @@
@include border-radius(0);
& .ui-dialog-title {
padding: 6px 0;
padding: 6px 10px;
text-shadow: lighten($color-base, 10%) 1px 1px 0;
}

View File

@ -97,7 +97,7 @@ After you have edited the file, GitHub will offer to create a pull request for y
## Check List
* Adhere to our [coding conventions](coding-conventions)
* Adhere to our [coding conventions](/misc/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)
* When working on existing tickets, assign them to you and provide status updates through ticket comments
* Check your patches against the latest "trunk" or "master", as well as the latest release.

View File

@ -380,6 +380,7 @@ To avoid repetition, we've written some helpers for various use cases:
* Load into a PJAX panel: `<a href="..." class="cms-panel-link" data-pjax-target="Content">`
* Load URL as an iframe into a popup/dialog: `<a href="..." class="ss-ui-dialog-link">`
* GridField click to redirect to external link: `<a href="..." class="cms-panel-link action external-link">
## Buttons

View File

@ -38,7 +38,7 @@ We'll name it `MyAdmin`, but the class name can be anything you want.
class MyAdmin extends ModelAdmin {
private static $managed_models = array('Product','Category'); // Can manage multiple models
private static $url_segment = 'products'; // Linked as /admin/products/
private $menu_title = 'My Product Admin';
private static $menu_title = 'My Product Admin';
}
This will automatically add a new menu entry to the CMS, and you're ready to go!

View File

@ -139,11 +139,15 @@ to change inclusion-order, other than using *Requirements::clear* and rebuilding
requirements. Caution: Inclusion order is both relevant for CSS and Javascript files in terms of dependencies,
inheritance and overlays - please be careful when messing with the order of Requirements.
NOTE:
By default, SilverStripe includes all Javascript files at the bottom of the page body. If this causes problems for you,
### Javascript placement
By default, SilverStripe includes all Javascript files at the bottom of the page body, unless there's another script already loaded, then, it's inserted before the first `<script>` tag. If this causes problems for you,
for example if you're using animation that ends up showing everything until the bottom of the page loads, or shows
buttons before pushing them will actually work, you can change this behaviour through
the `Requirements.write_js_to_body` configuration setting.
buttons that rely on Javascript to work, you can change this behaviour. See below.
With the `Requirements.write_js_to_body`, you can configure if Javascript requirements are written to the head (false) or body (true).
With the `Requirements.force_js_to_bottom`, you can force Silverstripe to write the Javascript to the bottom of the page body, even if there is an earlier script tag. For example, when you have asynchronous scripts for Twitter earlier in your body (and stop speedtests from explaining about "scripts above the fold")
## CMS Requirements

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

View File

@ -1,19 +1,38 @@
# Files and Images
# Files, Images and Folders
## Files as database records
## Files, Images and Folders as database records
TODO Explain relationship of files to database
All files, images and folders in the 'assets' directory are stored in the database. Each record has the following database fields:
## Management through "Files & Images"
| Field name | Description |
| ---------- | ----------- |
| `ClassName` | The class name of the file (e.g. File, Image or Folder). |
| `Name` | The 'basename' of the file, or the folder name. For example 'my-image.jpg', or 'images' for a folder. |
| `Title` | The optional, human-readable title of the file for display only (doesn't apply to folders). |
| `Filename` | The path to the file/folder, relative to the webroot. For example 'assets/images/my-image.jpg', or 'assets/images/' for a folder. |
| `Content` | Typically unused, but handy for a textual representation of files. For example for fulltext indexing of PDF documents. |
| `ShowInSearch` | Whether the file should be shown in search results, defaults to '1'. See ["Tutorial 4 - Site Search"](/tutorials/4-site-search) for enabling search. |
| `ParentID` | The ID of the parent Folder that this File/Folder is in. A ParentID of '0' indicates that the File/Folder is in the 'assets' directory. |
| `OwnerID` | The ID of the Member that 'owns' the File/Folder (not related to filesystem permissions). |
TODO Screenshot of admin interface
## Management through the "Files" section of the CMS
If you have the CMS module installed, you can manage files, folders and images in the "Files" section of the CMS. Inside this section, you will see a list of files and folders like below:
![](_images/assets.png)
You can click on any file to edit it, or click on any folder to open it. To delete a file or a folder, simply click the red 'X' symbol next to it. If you click to open a folder, you can go back up one level by clicking the 'up' arrow above the folder name (highlighted below):
![](_images/assets_up.png)
Once you click to edit a file, you will see a form similar to the one below, in which you can edit the file's title, filename, owner, or even change which folder the file is located in:
![](_images/assets_editform.png)
You may also notice the 'Sync files' button (highlighted below). This button allows CMS users to 'synchronise' the database (remember, all files/folders are stored as database records) with the filesystem. This is particularly useful if someone has uploaded or removed files/folders via FTP, for example.
![](_images/assets_sync.png)
## Upload
TODO Link to UploadField and FileField classes
## Image Resizing
If you've changed the resize functions of your image uploaders you can run this again - and all the images will be
resampled to the new arguments for the GD functions. This also, in some cases, repairs broken image links that can
happen from time to time.
Files can be managed through a `FileField` or an `UploadField`. The `[api:FileField]` class provides a simple HTML input with a type of "file", whereas an `[api:UploadField]` provides a much more feature-rich field (including AJAX-based uploads, previews, relationship management and file data management). See [`Reference - UploadField`](/reference/uploadfield) for more information about how to use the `UploadField` class.

View File

@ -105,4 +105,4 @@ and comes with the same caveats.
## Related
* [Modules Development](/topics/module-developement)
* [Modules Development](/topics/module-development)

View File

@ -16,7 +16,7 @@ Here is an example of a test which extends SapphireTest:
class SiteTreeTest extends SapphireTest {
// Define the fixture file to use for this test class
private static $fixture_file = 'SiteTreeTest.yml';
protected static $fixture_file = 'SiteTreeTest.yml';
/**
* Test generation of the URLSegment values.

View File

@ -9,21 +9,32 @@
* @subpackage fields-formattedinput
*/
class CreditCardField extends TextField {
/**
* Add default attributes for use on all inputs.
*
* @return array List of attributes
*/
public function getAttributes() {
return array_merge(
parent::getAttributes(),
array(
'autocomplete' => 'off',
'maxlength' => 4,
'size' => 4
)
);
}
public function Field($properties = array()) {
$parts = $this->value;
if(!is_array($parts)) $parts = explode("\n", chunk_split($parts,4,"\n"));
$parts = array_pad($parts, 4, "");
// TODO Mark as disabled/readonly
$properties['ValueOne'] = $parts[0];
$properties['ValueTwo'] = $parts[1];
$properties['ValueThree'] = $parts[2];
$properties['ValueFour'] = $parts[3];
$properties['TabIndexOne'] = $this->getTabIndexHTML(0);
$properties['TabIndexTwo'] = $this->getTabIndexHTML(1);
$properties['TabIndexThree'] = $this->getTabIndexHTML(2);
$properties['TabIndexFour'] = $this->getTabIndexHTML(3);
return parent::Field($properties);
}
@ -34,14 +45,14 @@ class CreditCardField extends TextField {
* @param int $increment Increase current tabindex by this value
* @return string
*/
protected function getTabIndexHTML($increment = 0) {
public function getTabIndexHTML($increment = 0) {
// we can't add a tabindex if there hasn't been one set yet.
if($this->getAttribute('tabindex') === null) return false;
$tabIndex = (int)$this->getAttribute('tabindex') + (int)$increment;
return (is_numeric($tabIndex)) ? ' tabindex = "' . $tabIndex . '"' : '';
}
public function dataValue() {
if(is_array($this->value)) return implode("", $this->value);
else return $this->value;

View File

@ -9,14 +9,14 @@
* <b>Usage</b>
*
* <code>
* new FieldGroup(
* new FieldGroup(
* new HeaderField('FieldGroup 1'),
* new TextField('Firstname')
* FieldGroup::create(
* FieldGroup::create(
* HeaderField::create('FieldGroup 1'),
* TextField::create('Firstname')
* ),
* new FieldGroup(
* new HeaderField('FieldGroup 2'),
* new TextField('Surname')
* FieldGroup::create(
* HeaderField::create('FieldGroup 2'),
* TextField::create('Surname')
* )
* )
* </code>
@ -28,10 +28,10 @@
* $fields = parent::getCMSFields();
*
* $fields->addFieldToTab(
* 'Root.Content',
* new FieldGroup(
* new TimeField("StartTime","What's the start time?"),
* new TimeField("EndTime","What's the end time?")
* 'Root.Main',
* FieldGroup::create(
* TimeField::create("StartTime","What's the start time?"),
* TimeField::create("EndTime","What's the end time?")
* ),
* 'Content'
* );
@ -40,6 +40,17 @@
*
* }
* </code>
*
* <b>Setting a title to a FieldGroup</b>
*
* <code>
* $fields->addFieldToTab("Root.Main",
* FieldGroup::create(
* TimeField::create('StartTime','What's the start time?'),
* TimeField::create('EndTime', 'What's the end time?')
* )->setTitle('Time')
* );
* </code>
*
* @package forms
* @subpackage fields-structural

View File

@ -594,13 +594,13 @@ class HtmlEditorField_Toolbar extends RequestHandler {
$urlField->dontEscape = true;
if($file->Type == 'photo') {
$filePreview->FieldList()->insertBefore(new TextField(
$fields->insertBefore(new TextField(
'AltText',
_t('HtmlEditorField.IMAGEALTTEXT', 'Alternative text (alt) - shown if image can\'t be displayed'),
$file->Title,
80
), 'CaptionText');
$filePreview->FieldList()->insertBefore(new TextField(
$fields->insertBefore(new TextField(
'Title',
_t('HtmlEditorField.IMAGETITLE', 'Title text (tooltip) - for additional information about the image')
), 'CaptionText');

View File

@ -1244,7 +1244,9 @@ ss.editorWrappers['default'] = ss.editorWrappers.tinyMCE;
'src' : this.find('.thumbnail-preview').attr('src'),
'width' : width ? parseInt(width, 10) : null,
'height' : height ? parseInt(height, 10) : null,
'class' : this.find(':input[name=CSSClass]').val()
'class' : this.find(':input[name=CSSClass]').val(),
'alt' : this.find(':input[name=AltText]').val(),
'title' : this.find(':input[name=Title]').val()
};
},
getExtraData: function() {
@ -1278,6 +1280,8 @@ ss.editorWrappers['default'] = ss.editorWrappers.tinyMCE;
return $('<div />').append(el).html(); // Little hack to get outerHTML string
},
updateFromNode: function(node) {
this.find(':input[name=AltText]').val(node.attr('alt'));
this.find(':input[name=Title]').val(node.attr('title'));
this.find(':input[name=Width]').val(node.width());
this.find(':input[name=Height]').val(node.height());
this.find(':input[name=Title]').val(node.attr('title'));

View File

@ -16,7 +16,9 @@ class GroupedList extends SS_ListDecorator {
$result = array();
foreach ($this->list as $item) {
$key = is_object($item) ? $item->$index : $item[$index];
/* if $item is an Object, $index can be a method or a value,
* if $item is an array, $index is used as the index */
$key = is_object($item) ? ($item->hasMethod($index) ? $item->$index() : $item->$index) : $item[$index];
if (array_key_exists($key, $result)) {
$result[$key]->push($item);

View File

@ -1,6 +1,9 @@
<span id="{$Name}_Holder" class="creditCardField">
<input autocomplete="off" name="{$Name}[0]" value="{$ValueOne}" maxlength="4" $TabIndexOne/> -
<input autocomplete="off" name="{$Name}[1]" value="{$ValueTwo}" maxlength="4" $TabIndexTwo/> -
<input autocomplete="off" name="{$Name}[2]" value="{$ValueThree}" maxlength="4" $TabIndexThree/> -
<input autocomplete="off" name="{$Name}[3]" value="{$ValueFour}" maxlength="4" $TabIndexFour/>
<input $AttributesHTML('id', 'name', 'value', 'tabindex') name="{$Name}[0]" value="{$ValueOne}" $TabIndexHTML(0)/>
-
<input $AttributesHTML('id', 'name', 'value', 'tabindex') name="{$Name}[1]" value="{$ValueTwo}" $TabIndexHTML(1)/>
-
<input $AttributesHTML('id', 'name', 'value', 'tabindex') name="{$Name}[2]" value="{$ValueThree}" $TabIndexHTML(2)/>
-
<input $AttributesHTML('id', 'name', 'value', 'tabindex') name="{$Name}[3]" value="{$ValueFour}" $TabIndexHTML(3)/>
</span>

View File

@ -1,7 +1,7 @@
<div <% if $Name %>id="$Name"<% end_if %> class="field $Type $extraClass">
<div <% if $Name %>id="$Name"<% end_if %> class="field $Type">
<% if $Title %><label class="left">$Title</label><% end_if %>
<div class="middleColumn fieldgroup <% if Zebra %>fieldgroup-$Zebra<% end_if %>">
<div class="middleColumn fieldgroup<% if $Zebra %> fieldgroup-$Zebra<% end_if %>">
<% loop $FieldList %>
<div class="fieldgroup-field $FirstLast $EvenOdd">
$SmallFieldHolder

View File

@ -1,38 +1,38 @@
@todo
Feature: Manage my own settings
As a CMS user
I want to be able to change personal settings
In order to streamline my CMS experience
As a CMS user
I want to be able to change personal settings
In order to streamline my CMS experience
Background:
Given a "member" "Joe" belongs to "Admin Group" with "Email"="joe@test.com" and "Password"="secret"
And the "group" "Admin Group" has permissions "Full administrative rights"
And I am logged in with "joe@test.com" and "secret"
And I navigate to "admin/myprofile"
Background:
Given a "member" "Joe" belonging to "Admin Group" with "Email"="joe@test.com" and "Password"="secret"
And the "group" "Admin Group" has permissions "Full administrative rights"
And I log in with "joe@test.com" and "secret"
And I go to "admin/myprofile"
Scenario: I can edit my personal details
Given I fill in "First Name" with "Jack"
And I fill in "Surname" with "Johnson"
And I fill in "Email" with "jack@test.com"
When I press the "Save" button
Then I should not see "John"
But I should see "Jack"
And I should see "Johnson"
And I should see "jack@test.com"
Scenario: I can edit my personal details
Given I fill in "First Name" with "Jack"
And I fill in "Surname" with "Johnson"
And I fill in "Email" with "jack@test.com"
When I press the "Save" button
Given I go to "admin/myprofile"
Then I should not see "Joe"
Then I should see "Jack"
And I should see "Johnson"
Scenario: I can change my password
Given I click "Change Password"
And I fill out "Password" with "newsecret"
And I fill out "Confirm Password" with "newsecret"
And I press the "Save" button
And I log out
When I login with "joe@test.com" and "newsecret"
Then I should see the CMS
Scenario: I can change my password
Given I follow "Change Password"
And I fill in "Password" with "newsecret"
And I fill in "Confirm Password" with "newsecret"
And I press the "Save" button
And I am not logged in
When I log in with "joe@test.com" and "newsecret"
And I go to "admin/myprofile"
Then I should see the CMS
Scenario: I can change the interface language
Given I fill in "Interface Language" with "German (Germany)"
And I press the "Save" button
Then I should see "Sprache"
Scenario: I can change the interface language
Given I fill in the "Interface Language" dropdown with "German (Germany)"
And I press the "Save" button
Then I should see "Sprache"
# TODO Date/time format - Difficult because its not exposed anywhere in the CMS?
# TODO Group modification as ADMIN user

View File

@ -27,7 +27,14 @@ class CacheTest extends SapphireTest {
$cache->save('Good', 'cachekey');
$this->assertEquals('Good', $cache->load('cachekey'));
sleep(2);
// As per documentation, sleep may not sleep for the amount of time you tell it to sleep for
// This loop can make sure it *does* sleep for that long
$endtime = time() + 2;
while (time() < $endtime) {
// Sleep for another 2 seconds!
// This may end up sleeping for 4 seconds, but it's awwwwwwwright.
sleep(2);
}
$this->assertFalse($cache->load('cachekey'));
}

View File

@ -13,7 +13,7 @@ class ErrorControlChainTest_Chain extends ErrorControlChain {
return parent::translateMemstring($memstring);
}
function executeInSubprocess() {
function executeInSubprocess($includeStderr = false) {
// Get the path to the ErrorControlChain class
$classpath = SS_ClassLoader::instance()->getItemPath('ErrorControlChain');
$suppression = $this->suppression ? 'true' : 'false';
@ -47,10 +47,14 @@ require_once '$classpath';
// Now stick it in a temporary file & run it
$codepath = TEMP_FOLDER.'/ErrorControlChainTest_'.sha1($src).'.php';
$null = is_writeable('/dev/null') ? '/dev/null' : 'NUL';
if($includeStderr) {
$null = '&1';
} else {
$null = is_writeable('/dev/null') ? '/dev/null' : 'NUL';
}
file_put_contents($codepath, $src);
exec("php $codepath 2> $null", $stdout, $errcode);
exec("php $codepath 2>$null", $stdout, $errcode);
unlink($codepath);
return array(implode("\n", $stdout), $errcode);
@ -185,9 +189,10 @@ class ErrorControlChainTest extends SapphireTest {
->then(function($chain){
Foo::bar(); // Non-existant class causes fatal error
})
->executeInSubprocess();
->executeInSubprocess(true);
$this->assertContains("Fatal error: Class 'Foo' not found", $out);
$this->assertContains('Fatal error', $out);
$this->assertContains('Foo', $out);
// Turning off suppression during execution
@ -198,9 +203,10 @@ class ErrorControlChainTest extends SapphireTest {
$chain->setSuppression(false);
Foo::bar(); // Non-existent class causes fatal error
})
->executeInSubprocess();
->executeInSubprocess(true);
$this->assertContains("Fatal error: Class 'Foo' not found", $out);
$this->assertContains('Fatal error', $out);
$this->assertContains('Foo', $out);
}
function testDoesntAffectNonFatalErrors() {
@ -279,4 +285,4 @@ class ErrorControlChainTest extends SapphireTest {
$this->assertEquals(200, $chain->translateMemstring('200foo'));
$this->assertEquals(300, $chain->translateMemstring('300foo'));
}
}
}