mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@71264 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
5687e0a7f4
commit
3680bbea46
@ -108,34 +108,6 @@ class AssetTableField extends ComplexTableField {
|
||||
new LiteralField("ImageFull",
|
||||
"<img id='thumbnailImage' src='{$thumbnail}?r=" . rand(1,100000) . "' alt='{$childData->Name}' />" )
|
||||
);
|
||||
|
||||
if(class_exists('GalleryFile')) {
|
||||
$tab = $detailFormFields->findOrMakeTab("BottomRoot.GalleryOptions", _t('AssetTableField.GALLERYOPTIONS', 'Gallery Options'));
|
||||
$tab->push(
|
||||
new TextField( "Content", _t('AssetTableField.CAPTION', 'Caption') )
|
||||
);
|
||||
}
|
||||
}
|
||||
else if (class_exists('GalleryFile')) {
|
||||
$tab = $detailFormFields->findOrMakeTab("BottomRoot.GalleryOptions", _t('AssetTableField.GALLERYOPTIONS', 'Gallery Options'));
|
||||
if( $childData->Extension == 'swf' ) {
|
||||
$tab->push(
|
||||
new TextField( "Content", _t('AssetTableField.CAPTION', 'Caption') ),
|
||||
new TextField( 'PopupWidth', _t('AssetTableField.POPUPWIDTH', 'Popup Width') ),
|
||||
new TextField( 'PopupHeight', _t('AssetTableField.POPUPHEIGHT', 'Popup Height') ),
|
||||
new HeaderField( 'SWFFileOptionsHeader', _t('AssetTableField.SWFFILEOPTIONS', 'SWF File Options') ),
|
||||
new CheckboxField( 'Embed', _t('AssetTableField.ISFLASH', 'Is A Flash Document') ),
|
||||
new CheckboxField( 'LimitDimensions', _t('AssetTableField.DIMLIMT', 'Limit The Dimensions In The Popup Window') )
|
||||
);
|
||||
}
|
||||
else {
|
||||
$tab = $detailFormFields->findOrMakeTab("BottomRoot.GalleryOptions", _t('AssetTableField.GALLERYOPTIONS', 'Gallery Options'));
|
||||
$tab->push(
|
||||
new TextField( "Content", _t('AssetTableField.CAPTION', 'Caption') ),
|
||||
new TextField( 'PopupWidth', _t('AssetTableField.POPUPWIDTH', 'Popup Width') ),
|
||||
new TextField( 'PopupHeight', _t('AssetTableField.POPUPHEIGHT', 'Popup Height') )
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if($childData && $childData->hasMethod('BackLinkTracking')) {
|
||||
|
@ -324,30 +324,9 @@ JS;
|
||||
* @return DataObjectSet
|
||||
*/
|
||||
public function PageTypes() {
|
||||
$classes = ClassInfo::getValidSubClasses();
|
||||
array_shift($classes);
|
||||
$classes = SiteTree::page_type_classes();
|
||||
|
||||
$result = new DataObjectSet();
|
||||
$kill_ancestors = array();
|
||||
|
||||
// figure out if there are any classes we don't want to appear
|
||||
foreach($classes as $class) {
|
||||
$instance = singleton($class);
|
||||
|
||||
// do any of the progeny want to hide an ancestor?
|
||||
if($ancestor_to_hide = $instance->stat('hide_ancestor')) {
|
||||
// note for killing later
|
||||
$kill_ancestors[] = $ancestor_to_hide;
|
||||
}
|
||||
}
|
||||
|
||||
// If any of the descendents don't want any of the elders to show up, cruelly render the elders surplus to requirements.
|
||||
if($kill_ancestors) {
|
||||
foreach ($kill_ancestors as $mark) {
|
||||
// unset from $classes
|
||||
$idx = array_search($mark, $classes);
|
||||
unset($classes[$idx]);
|
||||
}
|
||||
}
|
||||
|
||||
foreach($classes as $class) {
|
||||
$instance = singleton($class);
|
||||
@ -642,7 +621,7 @@ JS;
|
||||
if(Director::is_ajax()) {
|
||||
// need a valid ID value even if the record doesn't have one in the database
|
||||
// (its still present in the live tables)
|
||||
$liveRecord = Versioned::get_one_by_stage('SiteTree', 'Live', "\"SiteTree_Live\".\"ID\" = $recordID");
|
||||
$liveRecord = Versioned::get_one_by_stage('SiteTree', 'Live', "SiteTree_Live.ID = $recordID");
|
||||
// if the page has never been published to live, we need to act the same way as in deletefromlive()
|
||||
if($liveRecord) {
|
||||
// the form is readonly now, so we need to refresh the representation
|
||||
@ -1177,8 +1156,7 @@ JS;
|
||||
|
||||
return new Form($this, "AddPageOptionsForm", new FieldSet(
|
||||
new HiddenField("ParentID"),
|
||||
new DropdownField("PageType", "", $pageTypes)
|
||||
// "Page to copy" => new TreeDropdownField("DuplicateSection", "", "SiteTree"),
|
||||
new DropdownField("PageType", "", $pageTypes, 'Page')
|
||||
),
|
||||
new FieldSet(
|
||||
new FormAction("addpage", _t('CMSMain.GO',"Go"))
|
||||
|
@ -33,9 +33,9 @@ class MemberTableField extends ComplexTableField {
|
||||
static $data_class = "Member";
|
||||
|
||||
protected $permissions = array(
|
||||
"add",
|
||||
"edit",
|
||||
"delete"
|
||||
'add',
|
||||
'edit',
|
||||
'delete'
|
||||
);
|
||||
|
||||
private static $addedPermissions = array();
|
||||
@ -44,32 +44,31 @@ class MemberTableField extends ComplexTableField {
|
||||
|
||||
private static $addedCsvFields = array();
|
||||
|
||||
public static function addPermissions( $addingPermissionList ) {
|
||||
public static function addPermissions($addingPermissionList) {
|
||||
self::$addedPermissions = $addingPermissionList;
|
||||
}
|
||||
|
||||
public static function addMembershipFields( $addingFieldList, $addingCsvFieldList = null ) {
|
||||
public static function addMembershipFields($addingFieldList, $addingCsvFieldList = null) {
|
||||
self::$addedFields = $addingFieldList;
|
||||
$addingCsvFieldList == null ? self::$addedCsvFields = $addingFieldList : self::$addedCsvFields = $addingCsvFieldList;
|
||||
}
|
||||
|
||||
function __construct($controller, $name, $group, $members = null, $hidePassword = true, $pageLimit = 10) {
|
||||
|
||||
if($group) {
|
||||
if(is_object($group)) {
|
||||
$this->group = $group;
|
||||
} else if(is_numeric($group)){
|
||||
$this->group = DataObject::get_by_id('Group',$group);
|
||||
} elseif(is_numeric($group)) {
|
||||
$this->group = DataObject::get_by_id('Group', $group);
|
||||
}
|
||||
} else if(is_numeric($_REQUEST['ctf'][$this->Name()]["ID"])) {
|
||||
$this->group = DataObject::get_by_id('Group',$_REQUEST['ctf'][$this->Name()]["ID"]);
|
||||
$this->group = DataObject::get_by_id('Group', $_REQUEST['ctf'][$this->Name()]["ID"]);
|
||||
}
|
||||
|
||||
$sourceClass = $this->stat('data_class');
|
||||
|
||||
$sourceClass = $this->stat("data_class");
|
||||
|
||||
foreach( self::$addedPermissions as $permission )
|
||||
foreach(self::$addedPermissions as $permission) {
|
||||
array_push( $this->permissions, $permission );
|
||||
}
|
||||
|
||||
$fieldList = array(
|
||||
"FirstName" => _t('MemberTableField.FIRSTNAME', 'Firstname'),
|
||||
@ -78,11 +77,11 @@ class MemberTableField extends ComplexTableField {
|
||||
);
|
||||
|
||||
$csvFieldList = $fieldList;
|
||||
foreach( self::$addedCsvFields as $key => $value ) {
|
||||
foreach(self::$addedCsvFields as $key => $value) {
|
||||
$csvFieldList[$key] = $value;
|
||||
}
|
||||
|
||||
foreach( self::$addedFields as $key => $value ) {
|
||||
foreach(self::$addedFields as $key => $value) {
|
||||
$fieldList[$key] = $value;
|
||||
}
|
||||
|
||||
@ -102,12 +101,7 @@ class MemberTableField extends ComplexTableField {
|
||||
Requirements::javascript(CMS_DIR . '/javascript/MemberTableField.js');
|
||||
Requirements::javascript(CMS_DIR . "/javascript/MemberTableField_popup.js");
|
||||
|
||||
// construct the filter and sort
|
||||
if(isset($_REQUEST['MemberOrderByField'])) {
|
||||
$this->sourceSort = '"' . Convert::raw2sql($_REQUEST['MemberOrderByField']) . '"' . Convert::raw2sql( $_REQUEST['MemberOrderByOrder'] );
|
||||
}
|
||||
|
||||
$SNG_member = singleton('Member');
|
||||
$SNG_member = singleton($this->stat('data_class'));
|
||||
|
||||
// search
|
||||
$SQL_search = isset($_REQUEST['MemberSearch']) ? Convert::raw2sql($_REQUEST['MemberSearch']) : null;
|
||||
@ -129,11 +123,6 @@ class MemberTableField extends ComplexTableField {
|
||||
$this->setFieldListCsv( $csvFieldList );
|
||||
}
|
||||
|
||||
/**
|
||||
* Overridden functions
|
||||
*/
|
||||
|
||||
|
||||
function sourceID() {
|
||||
return $this->group->ID;
|
||||
}
|
||||
@ -145,46 +134,21 @@ class MemberTableField extends ComplexTableField {
|
||||
function SearchForm() {
|
||||
$searchFields = new FieldGroup(
|
||||
new TextField('MemberSearch', _t('MemberTableField.SEARCH', 'Search')),
|
||||
new HiddenField("ctf[ID]",'',$this->group->ID),
|
||||
new HiddenField('MemberFieldName','',$this->name),
|
||||
new HiddenField('MemberDontShowPassword','',$this->hidePassword)
|
||||
new HiddenField("ctf[ID]", '', $this->group->ID),
|
||||
new HiddenField('MemberFieldName', '', $this->name),
|
||||
new HiddenField('MemberDontShowPassword', '', $this->hidePassword)
|
||||
);
|
||||
|
||||
$orderByFields = new FieldGroup(
|
||||
new LabelField('OrderByLabel',_t('MemberTableField.ORDERBY', 'Order by')),
|
||||
new FieldSet(
|
||||
new DropdownField('MemberOrderByField','', array(
|
||||
'FirstName' => _t('MemberTableField.FIRSTNAME', 'FirstName'),
|
||||
'Surname' => _t('MemberTableField.SURNAME', 'Surname'),
|
||||
'Email' => _t('MemberTableField.EMAIL', 'Email')
|
||||
)),
|
||||
new DropdownField('MemberOrderByOrder','',array(
|
||||
'ASC' => _t('MemberTableField.ASC', 'Ascending'),
|
||||
'DESC' => _t('MemberTableField.DESC', 'Descending')
|
||||
))
|
||||
)
|
||||
);
|
||||
|
||||
$groups = DataObject::get('Group');
|
||||
$groupArray = array('' => _t('MemberTableField.ANYGROUP', 'Any group'));
|
||||
foreach( $groups as $group ) {
|
||||
$groupArray[$group->ID] = $group->Title;
|
||||
}
|
||||
$groupFields = new DropdownField('MemberGroup', _t('MemberTableField.FILTERBYGROUP', 'Filter by group'),$groupArray );
|
||||
|
||||
$actionFields = new LiteralField('MemberFilterButton','<input type="submit" class="action" name="MemberFilterButton" value="'._t('MemberTableField.FILTER', 'Filter').'" id="MemberFilterButton"/>');
|
||||
|
||||
$fieldContainer = new FieldGroup(
|
||||
$searchFields,
|
||||
// $orderByFields,
|
||||
// $groupFields,
|
||||
$actionFields
|
||||
$searchFields,
|
||||
$actionFields
|
||||
);
|
||||
|
||||
return $fieldContainer->FieldHolder();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add existing member to group rather than creating a new member
|
||||
*/
|
||||
@ -239,8 +203,6 @@ class MemberTableField extends ComplexTableField {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* #################################
|
||||
* Utility Functions
|
||||
@ -254,7 +216,6 @@ class MemberTableField extends ComplexTableField {
|
||||
return 'GroupID';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* #################################
|
||||
* Custom Functions
|
||||
@ -271,6 +232,7 @@ class MemberTableField extends ComplexTableField {
|
||||
function setGroup($group) {
|
||||
$this->group = $group;
|
||||
}
|
||||
|
||||
function setController($controller) {
|
||||
$this->controller = $controller;
|
||||
}
|
||||
@ -284,17 +246,25 @@ class MemberTableField extends ComplexTableField {
|
||||
*/
|
||||
function AddRecordForm() {
|
||||
$fields = new FieldSet();
|
||||
foreach($this->FieldList() as $fieldName=>$fieldTitle) {
|
||||
foreach($this->FieldList() as $fieldName => $fieldTitle) {
|
||||
$fields->push(new TextField($fieldName));
|
||||
}
|
||||
$fields->push(new HiddenField('ctf[ID]', null, $this->group->ID));
|
||||
|
||||
return new TabularStyle(new NestedForm(new Form($this, 'AddRecordForm',
|
||||
$fields,
|
||||
new FieldSet(
|
||||
new FormAction('addtogroup', _t('MemberTableField.ADD','Add'))
|
||||
$actions = new FieldSet(
|
||||
new FormAction('addtogroup', _t('MemberTableField.ADD','Add'))
|
||||
);
|
||||
|
||||
return new TabularStyle(
|
||||
new NestedForm(
|
||||
new Form(
|
||||
$this,
|
||||
'AddRecordForm',
|
||||
$fields,
|
||||
$actions
|
||||
)
|
||||
)
|
||||
)));
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -331,7 +301,7 @@ class MemberTableField extends ComplexTableField {
|
||||
*
|
||||
* This includes getting inherited groups, such as groups under groups.
|
||||
*/
|
||||
function sourceItems(){
|
||||
function sourceItems() {
|
||||
// Caching.
|
||||
if($this->sourceItems) {
|
||||
return $this->sourceItems;
|
||||
@ -343,20 +313,21 @@ class MemberTableField extends ComplexTableField {
|
||||
$limitClause = ($_REQUEST['ctf'][$this->Name()]['start']) . ", {$this->pageSize}";
|
||||
} else {
|
||||
$limitClause = "0, {$this->pageSize}";
|
||||
|
||||
}
|
||||
|
||||
// We use the group to get the members, as they already have the bulk of the look up functions
|
||||
$start = isset($_REQUEST['ctf'][$this->Name()]['start']) ? $_REQUEST['ctf'][$this->Name()]['start'] : 0;
|
||||
|
||||
$this->sourceItems = $this->group->Members(
|
||||
$this->pageSize, // limit
|
||||
$start, // offset
|
||||
$this->sourceFilter,
|
||||
$this->sourceSort
|
||||
);
|
||||
$this->unpagedSourceItems = $this->group->Members( '', '', $this->sourceFilter, $this->sourceSort );
|
||||
$this->pageSize, // limit
|
||||
$start, // offset
|
||||
$this->sourceFilter,
|
||||
$this->sourceSort
|
||||
);
|
||||
|
||||
$this->unpagedSourceItems = $this->group->Members('', '', $this->sourceFilter, $this->sourceSort);
|
||||
$this->totalCount = ($this->sourceItems) ? $this->sourceItems->TotalItems() : 0;
|
||||
|
||||
return $this->sourceItems;
|
||||
}
|
||||
|
||||
|
@ -208,7 +208,7 @@ abstract class ModelAdmin extends LeftAndMain {
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
protected function getManagedModels() {
|
||||
function getManagedModels() {
|
||||
$models = $this->stat('managed_models');
|
||||
if(is_string($models)) $models = array($models);
|
||||
if(!count($models)) user_error('ModelAdmin::getManagedModels():
|
||||
@ -674,21 +674,23 @@ class ModelAdmin_CollectionController extends Controller {
|
||||
*/
|
||||
public function AddForm() {
|
||||
$newRecord = new $this->modelClass();
|
||||
if($newRecord->hasMethod('getCMSAddFormFields')) {
|
||||
$fields = $newRecord->getCMSAddFormFields();
|
||||
} else {
|
||||
$fields = $newRecord->getCMSFields();
|
||||
}
|
||||
if($newRecord->canCreate()){
|
||||
if($newRecord->hasMethod('getCMSAddFormFields')) {
|
||||
$fields = $newRecord->getCMSAddFormFields();
|
||||
} else {
|
||||
$fields = $newRecord->getCMSFields();
|
||||
}
|
||||
|
||||
$validator = ($newRecord->hasMethod('getCMSValidator')) ? $newRecord->getCMSValidator() : null;
|
||||
$validator = ($newRecord->hasMethod('getCMSValidator')) ? $newRecord->getCMSValidator() : null;
|
||||
|
||||
$actions = new FieldSet(
|
||||
new FormAction("doCreate", _t('ModelAdmin.ADDBUTTON', "Add"))
|
||||
);
|
||||
$actions = new FieldSet(
|
||||
new FormAction("doCreate", _t('ModelAdmin.ADDBUTTON', "Add"))
|
||||
);
|
||||
|
||||
$form = new Form($this, "AddForm", $fields, $actions, $validator);
|
||||
$form = new Form($this, "AddForm", $fields, $actions, $validator);
|
||||
|
||||
return $form;
|
||||
return $form;
|
||||
}
|
||||
}
|
||||
|
||||
function doCreate($data, $form, $request) {
|
||||
@ -771,7 +773,11 @@ class ModelAdmin_RecordController extends Controller {
|
||||
$validator = ($this->currentRecord->hasMethod('getCMSValidator')) ? $this->currentRecord->getCMSValidator() : null;
|
||||
|
||||
$actions = $this->currentRecord->getCMSActions();
|
||||
$actions->push(new FormAction("doSave", _t('ModelAdmin.SAVE', "Save")));
|
||||
if($this->currentRecord->canEdit(Member::currentUser())){
|
||||
$actions->push(new FormAction("doSave", _t('ModelAdmin.SAVE', "Save")));
|
||||
}else{
|
||||
$fields = $fields->makeReadonly();
|
||||
}
|
||||
|
||||
if($this->currentRecord->canDelete(Member::currentUser())) {
|
||||
$actions->insertFirst($deleteAction = new FormAction('doDelete', _t('ModelAdmin.DELETE', 'Delete')));
|
||||
|
@ -1,7 +1,11 @@
|
||||
#left form.actionparams {
|
||||
background: #eee;
|
||||
padding: 3px 5px;
|
||||
padding: 0 0 5px 0;
|
||||
float: left;
|
||||
}
|
||||
#left form#search_options {
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
#left form.actionparams input,
|
||||
#left form.actionparams select {
|
||||
padding: 1px;
|
||||
@ -14,7 +18,7 @@
|
||||
#PageType,
|
||||
#ReportSelector_holder select {
|
||||
float: left;
|
||||
margin-right: 3px;
|
||||
margin-right: 4px;
|
||||
padding: 1px;
|
||||
}
|
||||
#left form.actionparms input.action {
|
||||
@ -306,11 +310,17 @@ ul.tree span.a.last.Root span.c,
|
||||
ul.tree span.a.children.Root span.c {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
ul.tree span.a.Root span.c {
|
||||
background: url(../../jsparty/tree/images/i-bottom.gif) no-repeat scroll 0 50%;
|
||||
}
|
||||
|
||||
ul#sitetree.tree ul {
|
||||
margin-left: 0;
|
||||
}
|
||||
ul#sitetree.tree ul ul {
|
||||
margin-left: 16px;
|
||||
padding-left: 16px;
|
||||
background: url(../../jsparty/tree/images/i-repeater.gif) repeat-y scroll 0 50%;
|
||||
}
|
||||
|
||||
|
||||
@ -360,7 +370,9 @@ ul.tree span.untranslated a:visited {
|
||||
float: left;
|
||||
}
|
||||
#left form.actionparams #InputSiteTreeFilterDate .calendar {
|
||||
margin-left: -100px;
|
||||
margin-left: -96px;
|
||||
width: 190px;
|
||||
height: 141px;
|
||||
}
|
||||
/* IE7 fix: */
|
||||
#left form.actionparams #InputSiteTreeFilterDate table {
|
||||
@ -383,6 +395,31 @@ ul.tree span.untranslated a:visited {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
#SortItems {
|
||||
border-top: 1px solid #cccccc;
|
||||
padding: 5px 0 0 0;
|
||||
overflow: hidden;
|
||||
clear: left;
|
||||
width: 100%;
|
||||
}
|
||||
#SortItems input, #ShowChanged input {
|
||||
float: left;
|
||||
margin: 0 3px 0 0;
|
||||
}
|
||||
|
||||
#versions_actions .versionChoice {
|
||||
float: left;
|
||||
display: block;
|
||||
margin: 0 0 5px 0;
|
||||
}
|
||||
|
||||
#versions_actions input, #Remember input {
|
||||
float: left;
|
||||
display: block;
|
||||
padding-top: 2px;
|
||||
margin: 0 3px 0 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* i18n
|
||||
@ -394,13 +431,3 @@ ul.tree span.untranslated a:visited {
|
||||
border-top: 1px solid #CCCCCC;
|
||||
padding: 3px 0 3px 7px;
|
||||
}
|
||||
|
||||
#SortItems {
|
||||
border-bottom: 1px solid #cccccc;
|
||||
background: #eee none repeat scroll 0%;
|
||||
padding: 3px 0 3px 7px;
|
||||
}
|
||||
#SortItems #sortitems {
|
||||
float: left;
|
||||
margin-right: 3px;
|
||||
}
|
@ -17,6 +17,11 @@
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* legend tag shows up annoying spacing in IE6/7 */
|
||||
.right form legend {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.right form .field {
|
||||
/*margin: 3px !important;*/
|
||||
margin: 0;
|
||||
|
@ -20,14 +20,14 @@ body {
|
||||
.ajaxActions {
|
||||
position: absolute;
|
||||
bottom: 5px;
|
||||
right: 15px;
|
||||
right: 8px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#TreeActions {
|
||||
background: #eee;
|
||||
float: left;
|
||||
width: 100%;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
#TreeActions li {
|
||||
float: left;
|
||||
@ -51,8 +51,8 @@ li.action button {
|
||||
width: auto;
|
||||
border-color: #CCCCCC rgb(153, 153, 153) rgb(153, 153, 153) rgb(204, 204, 204);
|
||||
border-style: double;
|
||||
margin: 1px;
|
||||
padding: 2px;
|
||||
margin-right: 2px;
|
||||
padding: 2px 1px;
|
||||
font-size: 11px;
|
||||
}
|
||||
.ajaxActions input,
|
||||
@ -329,15 +329,70 @@ body.stillLoading select {
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
#sitetree {
|
||||
margin-top: 2px;
|
||||
width: 500px; /* IE's chocking right now */
|
||||
}
|
||||
html>body #sitetree {
|
||||
width: auto;
|
||||
|
||||
#sitetree_holder #TreeTools {
|
||||
float: left;
|
||||
width: inherit;
|
||||
}
|
||||
#SearchBox {
|
||||
float: left;
|
||||
width: 100%;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
#SearchBox #SiteTreeSearchTerm {
|
||||
padding: 1px 0 2px 0;
|
||||
}
|
||||
#sitetree_ul {
|
||||
padding: 3px 0 0 3px;
|
||||
clear: left;
|
||||
}
|
||||
#sitetree {
|
||||
width: 500px; /* IE's chocking right now */
|
||||
}
|
||||
html>body #sitetree {
|
||||
width: auto;
|
||||
}
|
||||
#left #TreeActions,
|
||||
#left #SortItems {
|
||||
background: #EEE;
|
||||
padding: 5px;
|
||||
float: left;
|
||||
width: 95%;
|
||||
}
|
||||
#left #SortItems {
|
||||
border-bottom: 1px solid #CCC;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
#TreeTools label {
|
||||
display: block;
|
||||
padding-top: 2px;
|
||||
_padding-top: 4px;
|
||||
}
|
||||
|
||||
div.spacer, li.spacer {
|
||||
#TreeTools #batchactionsforms {
|
||||
padding: 0 0 7px 1px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#TreeTools div p, #ShowChanged {
|
||||
margin: 0 0 5px 0;
|
||||
float: left;
|
||||
}
|
||||
#ShowChanged {
|
||||
width: 100%;
|
||||
}
|
||||
#TreeTools div.middleColumn {
|
||||
margin: 0;
|
||||
}
|
||||
#TreeTools #action_publish_selected,
|
||||
#TreeTools #action_publish_selected {
|
||||
padding: 2px 1px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
|
||||
div.spacer,
|
||||
li.spacer {
|
||||
float: none;
|
||||
clear: both;
|
||||
background-color: transparent;
|
||||
|
@ -102,8 +102,10 @@ CheckBoxRange.prototype = {
|
||||
this.form = form;
|
||||
this.field = field;
|
||||
this.eventPossibleCheckHappened = this.possibleCheckHappened.bindAsEventListener(this);
|
||||
Event.observe(form, "click", this.eventPossibleCheckHappened);
|
||||
Event.observe(form, "keyup", this.eventPossibleCheckHappened);
|
||||
if(form) {
|
||||
Event.observe(form, "click", this.eventPossibleCheckHappened);
|
||||
Event.observe(form, "keyup", this.eventPossibleCheckHappened);
|
||||
}
|
||||
},
|
||||
|
||||
possibleCheckHappened: function(event) {
|
||||
|
@ -451,6 +451,6 @@ window.name = windowName('cms');
|
||||
* Return a unique window name that contains the URL
|
||||
*/
|
||||
function windowName(suffix) {
|
||||
var base = document.getElementsByTagName('base')[0].href.replace('http://','').replace(/\//g,'_').replace(/\./g,'_');
|
||||
var base = document.getElementsByTagName('base')[0].href.replace('~','').replace('http://','').replace(/\//g,'_').replace(/\./g,'_');
|
||||
return base + suffix;
|
||||
}
|
@ -144,7 +144,7 @@ $(document).ready(function() {
|
||||
* Table record handler for search result record
|
||||
* @todo: Shouldn't this be part of TableListField?
|
||||
*/
|
||||
$('#right #Form_ResultsForm tbody td a:not(.deletelink)')
|
||||
$('#right #Form_ResultsForm tbody td a:not(.deletelink,.downloadlink)')
|
||||
.livequery('click', function(){
|
||||
$(this).parent().parent().addClass('loading');
|
||||
var el = $(this);
|
||||
|
@ -242,7 +242,7 @@ TinyMCEImageEnhancement.prototype = {
|
||||
destHeight = imgTag.className.match(/destheight=([0-9.\-]+)([, ]|$)/) ? RegExp.$1 : null;
|
||||
} catch(er) {
|
||||
}
|
||||
TinyMCE_AdvancedTheme._insertImage(relativeHref, altText, 0, null, null, destWidth, destHeight, null, null, cssClass);
|
||||
TinyMCE_AdvancedTheme._insertImage(relativeHref, altText, 0, '', '', destWidth, destHeight, '', '', cssClass);
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -7,65 +7,70 @@
|
||||
<% _t('SITECONTENT TITLE','Site Content and Structure',PR_HIGH) %>
|
||||
</h2>
|
||||
<div id="sitetree_holder">
|
||||
|
||||
<ul id="TreeActions">
|
||||
<li class="action" id="addpage"><button<% if EditingLang %> disabled="disabled" class="disabled"<% end_if %>><% _t('CREATE','Create',PR_HIGH) %></button></li>
|
||||
<li class="action" id="search"><button><% _t('SEARCH','Search',PR_HIGH) %></button></li>
|
||||
<li class="action" id="batchactions"><button><% _t('BATCHACTIONS','Batch Actions',PR_HIGH) %></button></li>
|
||||
<!-- <li class="action" id="duplicate"><a href="#">Duplicate</a></li>
|
||||
Sam: this should be put into the Create area, I think, so we don't stuff up the layout -->
|
||||
</ul>
|
||||
<div style="clear:both;"></div>
|
||||
<% control AddPageOptionsForm %>
|
||||
<form class="actionparams" id="$FormName" style="display: none" action="$FormAction">
|
||||
<% control Fields %>
|
||||
$FieldHolder
|
||||
<% end_control %>
|
||||
<!--
|
||||
<div>
|
||||
<select name="Type">
|
||||
<% control PageTypes %>
|
||||
<option value="$ClassName">$AddAction</option>
|
||||
<div id="TreeTools">
|
||||
<ul id="TreeActions">
|
||||
<li class="action" id="addpage"><button<% if EditingLang %> disabled="disabled" class="disabled"<% end_if %>><% _t('CREATE','Create',PR_HIGH) %></button></li>
|
||||
<li class="action" id="search"><button><% _t('SEARCH','Search',PR_HIGH) %></button></li>
|
||||
<li class="action" id="batchactions"><button><% _t('BATCHACTIONS','Batch Actions',PR_HIGH) %></button></li>
|
||||
<!-- <li class="action" id="duplicate"><a href="#">Duplicate</a></li>
|
||||
Sam: this should be put into the Create area, I think, so we don't stuff up the layout -->
|
||||
</ul>
|
||||
<div style="clear:both;"></div>
|
||||
<% control AddPageOptionsForm %>
|
||||
<form class="actionparams" id="$FormName" style="display: none" action="$FormAction">
|
||||
<% control Fields %>
|
||||
$FieldHolder
|
||||
<% end_control %>
|
||||
</select>
|
||||
<input type="hidden" name="ParentID" />
|
||||
</div>
|
||||
-->
|
||||
<div>
|
||||
<input class="action" type="submit" value="<% _t('GO','Go') %>" />
|
||||
</div>
|
||||
</form>
|
||||
<% end_control %>
|
||||
<form class="actionparams" style="display: none" id="search_options" action="admin/filterSiteTree">
|
||||
<div>
|
||||
<input type="hidden" id="SiteTreeIsFiltered" value="0" />
|
||||
<input type="text" id="SiteTreeSearchTerm" name="SiteTreeSearchTerm" />
|
||||
<input type="submit" id="SiteTreeSearchButton" class="action" value="<% _t('SEARCH') %>" title="<% _t('SEARCHTITLE','Search through URL, Title, Menu Title, & Content') %>" />
|
||||
<div style="display:none" id="TextSiteTreeFilterDate" class="SearchCriteria"><% _t('EDITEDSINCE','Edited Since') %>:</div>
|
||||
<div style="display:none" id="InputSiteTreeFilterDate">$SiteTreeFilterDateField</div>
|
||||
<% control SiteTreeFilterOptions %>
|
||||
<div style="display:none" id="Text$Column" class="SearchCriteria">$Title:</div>
|
||||
<input style="display:none" id="Input$Column" name="$Column" class="SearchCriteria" />
|
||||
<!--
|
||||
<div>
|
||||
<select name="Type">
|
||||
<% control PageTypes %>
|
||||
<option value="$ClassName">$AddAction</option>
|
||||
<% end_control %>
|
||||
</select>
|
||||
<input type="hidden" name="ParentID" />
|
||||
</div>
|
||||
-->
|
||||
<div>
|
||||
<input class="action" type="submit" value="<% _t('GO','Go') %>" />
|
||||
</div>
|
||||
</form>
|
||||
<% end_control %>
|
||||
<select id="SiteTreeFilterAddCriteria">
|
||||
<option><% _t('ADDSEARCHCRITERIA','Add Criteria...') %></option>
|
||||
<option value="SiteTreeFilterDate"><% _t('EDITEDSINCE','Edited Since') %></option>
|
||||
<form class="actionparams" style="display: none" id="search_options" action="admin/filterSiteTree">
|
||||
<div>
|
||||
<input type="hidden" id="SiteTreeIsFiltered" value="0" />
|
||||
|
||||
<div id="SearchBox">
|
||||
<input type="text" id="SiteTreeSearchTerm" name="SiteTreeSearchTerm" />
|
||||
<input type="submit" id="SiteTreeSearchButton" class="action" value="<% _t('SEARCH') %>" title="<% _t('SEARCHTITLE','Search through URL, Title, Menu Title, & Content') %>" />
|
||||
</div>
|
||||
|
||||
<div style="display:none" id="TextSiteTreeFilterDate" class="SearchCriteria"><% _t('EDITEDSINCE','Edited Since') %>:</div>
|
||||
<div style="display:none" id="InputSiteTreeFilterDate">$SiteTreeFilterDateField</div>
|
||||
<% control SiteTreeFilterOptions %>
|
||||
<option value="$Column">$Title</option>
|
||||
<div style="display:none" id="Text$Column" class="SearchCriteria">$Title:</div>
|
||||
<input style="display:none" id="Input$Column" name="$Column" class="SearchCriteria" />
|
||||
<% end_control %>
|
||||
</select>
|
||||
<select id="SiteTreeFilterAddCriteria">
|
||||
<option><% _t('ADDSEARCHCRITERIA','Add Criteria...') %></option>
|
||||
<option value="SiteTreeFilterDate"><% _t('EDITEDSINCE','Edited Since') %></option>
|
||||
<% control SiteTreeFilterOptions %>
|
||||
<option value="$Column">$Title</option>
|
||||
<% end_control %>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
<div id="batchactionsforms" style="display: none">
|
||||
$DeleteItemsForm
|
||||
$PublishItemsForm
|
||||
|
||||
</div>
|
||||
<div id="SortItems">
|
||||
<input type="checkbox" id="sortitems" /> <label for="sortitems"><% _t('ENABLEDRAGGING','Allow drag & drop reordering', PR_HIGH) %></label>
|
||||
</div>
|
||||
<div id="LangSelector_holder" <% if MultipleLanguages %><% else %> class="onelang"<% end_if %>>
|
||||
Language: $LangSelector
|
||||
</div>
|
||||
</form>
|
||||
<div id="batchactionsforms" style="display: none">
|
||||
$DeleteItemsForm
|
||||
$PublishItemsForm
|
||||
|
||||
</div>
|
||||
<div id="SortItems">
|
||||
<input type="checkbox" id="sortitems" /> <label for="sortitems"><% _t('ENABLEDRAGGING','Allow drag & drop reordering', PR_HIGH) %></label>
|
||||
</div>
|
||||
<div id="LangSelector_holder" <% if MultipleLanguages %><% else %> class="onelang"<% end_if %>>
|
||||
Language: $LangSelector
|
||||
</div>
|
||||
<div id="sitetree_ul">
|
||||
$SiteTreeAsUL
|
||||
|
Loading…
Reference in New Issue
Block a user