Merged from branches/2.3

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@71276 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2009-02-03 03:46:15 +00:00
parent 77353d7e4f
commit 34a50e3de6
19 changed files with 181 additions and 136 deletions

View File

@ -81,7 +81,6 @@ class AssetAdmin extends LeftAndMain {
Requirements::javascript(CMS_DIR . "/javascript/CMSMain_upload.js"); Requirements::javascript(CMS_DIR . "/javascript/CMSMain_upload.js");
Requirements::javascript(CMS_DIR . "/javascript/Upload.js"); Requirements::javascript(CMS_DIR . "/javascript/Upload.js");
Requirements::javascript(SAPPHIRE_DIR . "/javascript/Security_login.js");
Requirements::javascript(THIRDPARTY_DIR . "/SWFUpload/SWFUpload.js"); Requirements::javascript(THIRDPARTY_DIR . "/SWFUpload/SWFUpload.js");
Requirements::javascript(THIRDPARTY_DIR . "/greybox/AmiJS.js"); Requirements::javascript(THIRDPARTY_DIR . "/greybox/AmiJS.js");
@ -142,7 +141,7 @@ JS
new HiddenField("ID", "", $this->currentPageID()), new HiddenField("ID", "", $this->currentPageID()),
// needed because the button-action is triggered outside the iframe // needed because the button-action is triggered outside the iframe
new HiddenField("action_doUpload", "", "1"), new HiddenField("action_doUpload", "", "1"),
new FileField("Files[0]" , _t('AssetAdmin.CHOOSEFILE','Choose file ')), new FileField("Files[0]" , _t('AssetAdmin.CHOOSEFILE','Choose file: ')),
new LiteralField('UploadButton'," new LiteralField('UploadButton',"
<input type='submit' value='". _t('AssetAdmin.UPLOAD', 'Upload Files Listed Below'). "' name='action_upload' id='Form_UploadForm_action_upload' class='action' /> <input type='submit' value='". _t('AssetAdmin.UPLOAD', 'Upload Files Listed Below'). "' name='action_upload' id='Form_UploadForm_action_upload' class='action' />
"), "),
@ -478,7 +477,8 @@ JS;
* Add a new folder and return its details suitable for ajax. * Add a new folder and return its details suitable for ajax.
*/ */
public function addfolder() { public function addfolder() {
$parent = ($_REQUEST['ParentID'] && is_numeric($_REQUEST['ParentID'])) ? $_REQUEST['ParentID'] : 0; $parent = ($_REQUEST['ParentID'] && is_numeric($_REQUEST['ParentID'])) ? (int)$_REQUEST['ParentID'] : 0;
$name = (isset($_REQUEST['Name'])) ? basename($_REQUEST['Name']) : _t('AssetAdmin.NEWFOLDER',"NewFolder");
if($parent) { if($parent) {
$parentObj = DataObject::get_by_id('File', $parent); $parentObj = DataObject::get_by_id('File', $parent);
@ -487,8 +487,8 @@ JS;
$p = new Folder(); $p = new Folder();
$p->ParentID = $parent; $p->ParentID = $parent;
$p->Title = _t('AssetAdmin.NEWFOLDER',"NewFolder"); $p->Title = $name;
$p->Name = _t('AssetAdmin.NEWFOLDER', 'NewFolder'); $p->Name = $name;
// Get the folder to be created // Get the folder to be created
if(isset($parentObj->ID)) $filename = $parentObj->FullPath . $p->Name; if(isset($parentObj->ID)) $filename = $parentObj->FullPath . $p->Name;
@ -641,57 +641,78 @@ JS;
*/ */
/** /**
* Removes all unused thumbnails, and echos status message to user. * Removes all unused thumbnails from the file store
* and returns the status of the process to the user.
*/ */
public function deleteUnusedThumbnails() { public function deleteunusedthumbnails() {
foreach($this->getUnusedThumbnailsArray() as $file) { $count = 0;
unlink(ASSETS_PATH . "/" . $file); $thumbnails = $this->getUnusedThumbnails();
}
echo "statusMessage('"._t('AssetAdmin.THUMBSDELETED', 'All unused thumbnails have been deleted')."','good')"; if($thumbnails) {
foreach($thumbnails as $thumbnail) {
unlink(ASSETS_PATH . "/" . $thumbnail);
$count++;
}
}
$message = sprintf(_t('AssetAdmin.THUMBSDELETED', '%s unused thumbnails have been deleted'), $count);
FormResponse::status_message($message, 'good');
echo FormResponse::respond();
} }
/** /**
* Creates array containg all unused thumbnails. * Creates array containg all unused thumbnails.
* *
* Array is created in three steps: * Array is created in three steps:
* 1.Scan assets folder and retrieve all thumbnails * 1. Scan assets folder and retrieve all thumbnails
* 2.Scan all HTMLField in system and retrieve thumbnails from them. * 2. Scan all HTMLField in system and retrieve thumbnails from them.
* 3.Count difference between two sets (array_diff) * 3. Count difference between two sets (array_diff)
* *
* @return array * @return array
*/ */
private function getUnusedThumbnailsArray() { private function getUnusedThumbnails() {
$allThumbnails = array(); $allThumbnails = array();
$usedThumbnails = array(); $usedThumbnails = array();
$dirIterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(ASSETS_PATH)); $dirIterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(ASSETS_PATH));
$classes = ClassInfo::subclassesFor('SiteTree');
foreach($dirIterator as $file) { if($dirIterator) {
if($file->isFile()) { foreach($dirIterator as $file) {
if(strpos($file->getPathname(),"_resampled") !== false) { if($file->isFile()) {
$pathInfo = pathinfo($file->getPathname()); if(strpos($file->getPathname(), '_resampled') !== false) {
if(in_array(strtolower($pathInfo['extension']), array('jpeg', 'jpg', 'jpe', 'png', 'gif'))) { $pathInfo = pathinfo($file->getPathname());
$path = str_replace('\\','/', $file->getPathname()); if(in_array(strtolower($pathInfo['extension']), array('jpeg', 'jpg', 'jpe', 'png', 'gif'))) {
$allThumbnails[] = substr($path, strpos($path, '/assets/') + 8); $path = str_replace('\\','/', $file->getPathname());
$allThumbnails[] = substr($path, strpos($path, '/assets/') + 8);
}
} }
} }
} }
} }
$classes = ClassInfo::subclassesFor('SiteTree'); if($classes) {
foreach($classes as $className) {
foreach($classes as $className) { $SNG_class = singleton($className);
$sng = singleton($className); $objects = DataObject::get($className);
$objects = DataObject::get($className);
if($objects !== NULL) { if($objects !== NULL) {
foreach($objects as $object) { foreach($objects as $object) {
foreach($sng->db() as $fieldName => $fieldType) { foreach($SNG_class->db() as $fieldName => $fieldType) {
if($fieldType == 'HTMLText') { if($fieldType == 'HTMLText') {
$url1 = HTTP::findByTagAndAttribute($object->$fieldName,array("img" => "src")); $url1 = HTTP::findByTagAndAttribute($object->$fieldName,array('img' => 'src'));
if($url1 != NULL) $usedThumbnails[] = substr($url1[0],strpos($url1[0],'/assets/')+8);
if($object->latestPublished > 0) { if($url1 != NULL) {
$object = Versioned::get_latest_version($className, $object->ID); $usedThumbnails[] = substr($url1[0], strpos($url1[0], '/assets/') + 8);
$url2 = HTTP::findByTagAndAttribute($object->$fieldName,array("img" => "src")); }
if($url2 != NULL) $usedThumbnails[] = substr($url2[0],strpos($url2[0],'/assets/')+8);
if($object->latestPublished > 0) {
$object = Versioned::get_latest_version($className, $object->ID);
$url2 = HTTP::findByTagAndAttribute($object->$fieldName, array('img' => 'src'));
if($url2 != NULL) {
$usedThumbnails[] = substr($url2[0], strpos($url2[0], '/assets/') + 8);
}
}
} }
} }
} }
@ -699,9 +720,8 @@ JS;
} }
} }
return array_diff($allThumbnails,$usedThumbnails); return array_diff($allThumbnails, $usedThumbnails);
} }
} }
?> ?>

View File

@ -65,9 +65,10 @@ class MemberTableField extends ComplexTableField {
} }
$sourceClass = $this->stat('data_class'); $sourceClass = $this->stat('data_class');
$SNG_member = singleton($this->stat('data_class'));
foreach(self::$addedPermissions as $permission) { foreach(self::$addedPermissions as $permission) {
array_push( $this->permissions, $permission ); array_push($this->permissions, $permission);
} }
$fieldList = array( $fieldList = array(
@ -75,12 +76,14 @@ class MemberTableField extends ComplexTableField {
"Surname" => _t('MemberTableField.SURNAME', 'Surname'), "Surname" => _t('MemberTableField.SURNAME', 'Surname'),
"Email" => _t('MemberTableField.EMAIL', 'Email') "Email" => _t('MemberTableField.EMAIL', 'Email')
); );
$memberDbFields = $SNG_member->db();
$csvFieldList = array();
$csvFieldList = $fieldList; foreach($memberDbFields as $field => $dbFieldType) {
foreach(self::$addedCsvFields as $key => $value) { $csvFieldList[$field] = $field;
$csvFieldList[$key] = $value;
} }
foreach(self::$addedFields as $key => $value) { foreach(self::$addedFields as $key => $value) {
$fieldList[$key] = $value; $fieldList[$key] = $value;
} }
@ -100,8 +103,6 @@ class MemberTableField extends ComplexTableField {
Requirements::javascript(CMS_DIR . '/javascript/MemberTableField.js'); Requirements::javascript(CMS_DIR . '/javascript/MemberTableField.js');
Requirements::javascript(CMS_DIR . "/javascript/MemberTableField_popup.js"); Requirements::javascript(CMS_DIR . "/javascript/MemberTableField_popup.js");
$SNG_member = singleton($this->stat('data_class'));
// search // search
$SQL_search = isset($_REQUEST['MemberSearch']) ? Convert::raw2sql($_REQUEST['MemberSearch']) : null; $SQL_search = isset($_REQUEST['MemberSearch']) ? Convert::raw2sql($_REQUEST['MemberSearch']) : null;
@ -120,7 +121,7 @@ class MemberTableField extends ComplexTableField {
} }
$this->sourceJoin = " INNER JOIN \"Group_Members\" ON \"MemberID\"=\"Member\".\"ID\""; $this->sourceJoin = " INNER JOIN \"Group_Members\" ON \"MemberID\"=\"Member\".\"ID\"";
$this->setFieldListCsv( $csvFieldList ); $this->setFieldListCsv($csvFieldList);
} }
function sourceID() { function sourceID() {
@ -325,7 +326,9 @@ class MemberTableField extends ComplexTableField {
$this->sourceSort $this->sourceSort
); );
$this->unpagedSourceItems = $this->group->Members('', '', $this->sourceFilter, $this->sourceSort); // Because we are not used $this->upagedSourceItems any more, and the DataObjectSet is usually the source
// that a large member set runs out of memory. we disable it here.
//$this->unpagedSourceItems = $this->group->Members('', '', $this->sourceFilter, $this->sourceSort);
$this->totalCount = ($this->sourceItems) ? $this->sourceItems->TotalItems() : 0; $this->totalCount = ($this->sourceItems) ? $this->sourceItems->TotalItems() : 0;
return $this->sourceItems; return $this->sourceItems;

View File

@ -670,28 +670,32 @@ class ModelAdmin_CollectionController extends Controller {
} }
/** /**
* Returns a form for editing the attached model * Returns a form suitable for adding a new model, falling back on the default edit form
*
* @return Form
*/ */
public function AddForm() { public function AddForm() {
$newRecord = new $this->modelClass(); $newRecord = new $this->modelClass();
if($newRecord->canCreate()){ if($newRecord->canCreate()){
if($newRecord->hasMethod('getCMSAddFormFields')) { if($newRecord->hasMethod('getCMSAddFormFields')) {
$fields = $newRecord->getCMSAddFormFields(); $fields = $newRecord->getCMSAddFormFields();
} else { } else {
$fields = $newRecord->getCMSFields(); $fields = $newRecord->getCMSFields();
} }
$validator = ($newRecord->hasMethod('getCMSValidator')) ? $newRecord->getCMSValidator() : null; $validator = ($newRecord->hasMethod('getCMSValidator')) ? $newRecord->getCMSValidator() : null;
$actions = new FieldSet( $actions = new FieldSet (
new FormAction("doCreate", _t('ModelAdmin.ADDBUTTON', "Add")) new FormAction("doCreate", _t('ModelAdmin.ADDBUTTON', "Add"))
); );
$form = new Form($this, "AddForm", $fields, $actions, $validator); $form = new Form($this, "AddForm", $fields, $actions, $validator);
$form->loadDataFrom($newRecord);
return $form; return $form;
} }
} }
function doCreate($data, $form, $request) { function doCreate($data, $form, $request) {
$className = $this->getModelClass(); $className = $this->getModelClass();

View File

@ -23,7 +23,8 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
'removememberfromgroup', 'removememberfromgroup',
'savemember', 'savemember',
'AddRecordForm', 'AddRecordForm',
'MemberForm' 'MemberForm',
'EditForm'
); );
public function init() { public function init() {
@ -232,4 +233,4 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
} }
} }
?> ?>

View File

@ -179,7 +179,7 @@ class PageComment_Controller extends Controller {
} }
} }
function approve() { function approve() {
if(Permission::check('CMS_ACCESS_CMSMain')) { if(Permission::check('CMS_ACCESS_CMSMain')) {
$comment = DataObject::get_by_id("PageComment", $this->urlParams['ID']); $comment = DataObject::get_by_id("PageComment", $this->urlParams['ID']);
$comment->NeedsModeration = false; $comment->NeedsModeration = false;

View File

@ -1,6 +1,9 @@
#right form .inlineformaction { #right form .inlineformaction {
margin-left: 0; margin-left: 0;
} }
#right form #deletemarked .middleColumn {
background: none;
}
.dragfile, .dragfile,
.dragfile img { .dragfile img {
float: left; float: left;

View File

@ -232,6 +232,7 @@ ul.tree span.a span.modified,
.listpane div.unitBody { .listpane div.unitBody {
overflow: auto; overflow: auto;
width: 100%; width: 100%;
clear: left;
} }
.listpane li a { .listpane li a {

View File

@ -23,7 +23,7 @@
} }
.right form .field { .right form .field {
/*margin: 3px !important;*/ border: none;
margin: 0; margin: 0;
} }
.right form .text, .right form .text,
@ -137,6 +137,40 @@
font-size: 12px; font-size: 12px;
} }
.right form .mceEditor select.mceNativeListBox {
background: #fff;
padding-top: 2px;
width: 95px; /* Added width to stop sizes jumping and text wrapping */
font-size: 11px;
}
.right form .mceEditor select.mceNativeListBox option {
padding: 0 2px 0 2px;
font-size: 11px;
}
.right form .mceEditor .mceFirst {
background: #f4f4f4;
}
.right form .mceEditor .mceToolbar table {
background: transparent;
}
.right form .mceEditor .mceButton {
padding: 1px;
}
.right form .mceEditor select.mceNativeListBox {
background: #fff;
}
.right form .mceEditor .mceFirst {
background:url(../images/textures/mce_editor.gif) repeat-x bottom;
}
.right form .mceEditor .mceToolbar table {
background: transparent;
}
.right form .mceEditor select.mceNativeListBox {
background: #fff;
}
.right form input.checkbox, .right form input.checkbox,
.right form .optionset input, .right form .optionset input,
.right form .htmleditor select, .right form .htmleditor select,
@ -159,7 +193,7 @@
float: left; float: left;
} }
.right form .optionset li.submit { .right form .optionset li.submit {
text-align: right; float: right;
} }
.right form h1 { .right form h1 {
@ -273,10 +307,13 @@
* Autocomplete * Autocomplete
*/ */
.autocomplete { .autocomplete {
margin-left: 1px;
background: white; background: white;
overflow: visible;
} }
.autocomplete ul { .autocomplete ul {
border: 1px solid #aaa; border: 1px solid #aaa;
background: #FFFFBB;
} }
.autocomplete li { .autocomplete li {
list-style-type: none; list-style-type: none;
@ -331,11 +368,11 @@
/* Filter box (for search/filter box above a table on Asset/MemberTableField) */ /* Filter box (for search/filter box above a table on Asset/MemberTableField) */
div.filterBox { div.filterBox {
width: 33em; width: inherit;
margin: 5px 0; margin: 5px 0;
padding: 5px; padding: 5px;
background: #ebeadb; background: #EEE;
border: 1px solid #aca899; border: 1px solid #BBB;
} }
div.filterBox .middleColumn { div.filterBox .middleColumn {
background: none !important; background: none !important;

View File

@ -518,6 +518,7 @@ iframe {
margin: -5px -5px 0 -5px; margin: -5px -5px 0 -5px;
} }
#contentPanel .thumbnailstrip h2 { #contentPanel .thumbnailstrip h2 {
font-size: 1.1em;
margin: 0; margin: 0;
background: none; background: none;
color: #555; color: #555;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 271 B

After

Width:  |  Height:  |  Size: 175 B

View File

@ -484,7 +484,7 @@ Behaviour.register({
eval(t.responseText); eval(t.responseText);
} }
}; };
new Ajax.Request('admin/assets/deleteUnusedThumbnails',options); new Ajax.Request('admin/assets/deleteunusedthumbnails',options);
} }
} }
}); });

View File

@ -111,17 +111,7 @@ CMSMain_upload.prototype = {
fileProgress.style.left = '5px'; fileProgress.style.left = '5px';
fileProgress.style.width = '0px'; fileProgress.style.width = '0px';
fileProgress.finished = false; fileProgress.finished = false;
switch(BrowserDetect.browser) { fileProgress.style.top = parseInt(fileProgress.style.top) + 6 + 'px';
case 'Explorer':
fileProgress.style.top = parseInt(fileProgress.style.top) + 6 + 'px';
break;
case 'Safari':
fileProgress.style.top = parseInt(fileProgress.style.top) + 4 + 'px';
break;
case 'Firefox':
fileProgress.style.top = parseInt(fileProgress.style.top) + 8 + 'px';
break;
}
fileProgress.style.height = Element.getDimensions(fileName).height + 1 + 'px'; fileProgress.style.height = Element.getDimensions(fileName).height + 1 + 'px';
fileToUpload.appendChild(fileProgress); fileToUpload.appendChild(fileProgress);

View File

@ -131,8 +131,8 @@ MemberTableField.prototype = {
updateURL = ""; updateURL = "";
updateURL += Event.findElement(e,"form").action; updateURL += Event.findElement(e,"form").action;
// we can't set "fieldName" as a HiddenField because there might be multiple ComplexTableFields in a single EditForm-container // we can't set "fieldName" as a HiddenField because there might be multiple ComplexTableFields in a single EditForm-container
updateURL += "&fieldName="+$('MemberFieldName').value; updateURL += "?fieldName="+$('MemberFieldName').value;
updateURL += "&action_callfieldmethod&&methodName=addtogroup&"; updateURL += "&action_callfieldmethod&methodName=addtogroup";
ajaxSubmitFieldSet(updateURL, data); ajaxSubmitFieldSet(updateURL, data);
} }
@ -276,4 +276,4 @@ MemberFilterButton.prototype = {
// has to be external from initialize() because otherwise request will double on each reload - WTF // has to be external from initialize() because otherwise request will double on each reload - WTF
Behaviour.register({ Behaviour.register({
'#Form_EditForm div.MemberTableField table.data input' : AjaxMemberLookup '#Form_EditForm div.MemberTableField table.data input' : AjaxMemberLookup
}); });

View File

@ -5,7 +5,5 @@ function action_addmember_right() {
var memberTableFields = document.getElementsBySelector('#Form_EditForm div.MemberTableField'); var memberTableFields = document.getElementsBySelector('#Form_EditForm div.MemberTableField');
var tables = document.getElementsBySelector('#Form_EditForm div.MemberTableField table'); var tables = document.getElementsBySelector('#Form_EditForm div.MemberTableField table');
var addLinks = document.getElementsBySelector('#Form_EditForm div.MemberTableField a.addlink'); var addLinks = document.getElementsBySelector('#Form_EditForm div.MemberTableField a.addlink');
try { memberTableFields[0].openPopup(null,addLinks[0].href,tables[0]);
memberTableFields[0].openPopup(null,addLinks[0].href,tables[0]);
} catch(err) {}
} }

View File

@ -12,7 +12,6 @@ TinyMCEImageEnhancement.prototype = {
addListeners: function() { addListeners: function() {
$('Form_EditorToolbarImageForm_FolderID').value = ""; $('Form_EditorToolbarImageForm_FolderID').value = "";
Event.observe($('AddFolder'),'click',this.onAddFolder.bind(this)); Event.observe($('AddFolder'),'click',this.onAddFolder.bind(this));
Event.observe($('FolderOk'),'click',this.onFolderOk.bind(this)); Event.observe($('FolderOk'),'click',this.onFolderOk.bind(this));
Event.observe($('FolderCancel'),'click',this.onFolderCancel.bind(this)); Event.observe($('FolderCancel'),'click',this.onFolderCancel.bind(this));
@ -74,7 +73,7 @@ TinyMCEImageEnhancement.prototype = {
var folderName = $('NewFolderName').value; var folderName = $('NewFolderName').value;
var options = { var options = {
method: 'post', method: 'post',
postBody: 'ParentID=' + this.getParentID() + '&ajax=1&returnID=1' + ($('SecurityID') ? '&SecurityID=' + $('SecurityID').value : ''), postBody: 'ParentID=' + this.getParentID() + '&ajax=1&returnID=1&Name=' + folderName + ($('SecurityID') ? '&SecurityID=' + $('SecurityID').value : ''),
onSuccess: this.onFolderGetSuccess.bind(this), onSuccess: this.onFolderGetSuccess.bind(this),
onFailure: function(transport) { onFailure: function(transport) {
errorMessage('Error: Folder not added', transport); errorMessage('Error: Folder not added', transport);
@ -105,30 +104,13 @@ TinyMCEImageEnhancement.prototype = {
this.folderID = folderID; this.folderID = folderID;
var options = { statusMessage('Creating new folder');
method: 'post',
postBody: 'Created=' + currentDate + '&Name=' + folderName + '&ClassName=Folder&ID=' + folderID + '&ajax=1&action_save=1' + ($('SecurityID') ? '&SecurityID=' + $('SecurityID').value : ''),
onSuccess: this.onFolderAddSuccess.bind(this),
onFailure: function(transport) {
errorMessage('Error: Folder not added', transport);
}
};
new Ajax.Request('admin/assets/EditForm', options);
},
/**
* When folder name has been changed we need to refresh folder list and return to initial state of UI.
*/
onFolderAddSuccess: function(transport) {
statusMessage('Creating new folder');
$('TreeDropdownField_Form_EditorToolbarImageForm_FolderID').itemTree = null; $('TreeDropdownField_Form_EditorToolbarImageForm_FolderID').itemTree = null;
$('TreeDropdownField_Form_EditorToolbarImageForm_FolderID').setValue(this.folderID); $('TreeDropdownField_Form_EditorToolbarImageForm_FolderID').setValue(this.folderID);
$('NewFolderName').value = ''; $('NewFolderName').value = '';
Element.show('AddFolder'); Element.show('AddFolder');
Element.hide('NewFolderName','FolderOk','FolderCancel'); Element.hide('NewFolderName','FolderOk','FolderCancel');
this.removeIE6Hack(); this.removeIE6Hack();
}, },
/** /**
@ -140,6 +122,8 @@ TinyMCEImageEnhancement.prototype = {
Element.show('AddFolder'); Element.show('AddFolder');
Element.hide('NewFolderName','FolderOk','FolderCancel'); Element.hide('NewFolderName','FolderOk','FolderCancel');
this.removeIE6Hack(); this.removeIE6Hack();
Event.stop(event);
return false;
}, },
/** /**
@ -147,10 +131,12 @@ TinyMCEImageEnhancement.prototype = {
*/ */
onWindowLoad: function() { onWindowLoad: function() {
// Due to a bug in the flash plugin on Linux and Mac, we need at least version 9.0.64 to use SWFUpload // Due to a bug in the flash plugin on Linux and Mac,
//we need at least version 9.0.64 to use SWFUpload
// see http://open.silverstripe.com/ticket/3023
if(navigator.appVersion.indexOf("Mac") != -1 || navigator.appVersion.indexOf("X11") != -1 || navigator.appVersion.indexOf("Linux") != -1) { if(navigator.appVersion.indexOf("Mac") != -1 || navigator.appVersion.indexOf("X11") != -1 || navigator.appVersion.indexOf("Linux") != -1) {
pv = getFlashPlayerVersion(); pv = getFlashPlayerVersion();
if(pv.major < 9 || (pv.major == 9 && pv.minor == 0 && pv.rev < 64)) { if(pv.major < 9 || pv.major > 9 || (pv.major == 9 && pv.minor == 0 && pv.rev < 64)) {
if($('AddFolderGroup')) $('AddFolderGroup').style.display = 'none'; if($('AddFolderGroup')) $('AddFolderGroup').style.display = 'none';
if($('PipeSeparator')) $('PipeSeparator').style.display = 'none'; if($('PipeSeparator')) $('PipeSeparator').style.display = 'none';
if($('UploadGroup')) $('UploadGroup').style.display = 'none'; if($('UploadGroup')) $('UploadGroup').style.display = 'none';
@ -251,7 +237,7 @@ TinyMCEImageEnhancement.prototype = {
*/ */
applyIE6Hack: function() { applyIE6Hack: function() {
if(BrowserDetect.browser == 'Explorer') { if(/msie/i.test(navigator.userAgent)) {
elements = [$('FolderOk'),$('FolderCancel'),$('UploadFiles')]; elements = [$('FolderOk'),$('FolderCancel'),$('UploadFiles')];
$A(elements).each(function(element) { $A(elements).each(function(element) {
element.style.position = "relative"; element.style.position = "relative";
@ -261,7 +247,7 @@ TinyMCEImageEnhancement.prototype = {
}, },
removeIE6Hack: function() { removeIE6Hack: function() {
if(BrowserDetect.browser == 'Explorer') { if(/msie/i.test(navigator.userAgent)) {
elements = [$('FolderOk'),$('FolderCancel'),$('UploadFiles')]; elements = [$('FolderOk'),$('FolderCancel'),$('UploadFiles')];
$A(elements).each(function(element) { $A(elements).each(function(element) {
element.style.position = ""; element.style.position = "";

View File

@ -14,7 +14,7 @@ if((typeof tinyMCE != 'undefined')) {
width: "100%", width: "100%",
auto_resize : false, auto_resize : false,
theme : "advanced", theme : "advanced",
content_css : "$ContentCSS", content_css : "cms/css/editor.css, $ContentCSS",
body_class : 'typography', body_class : 'typography',
document_base_url: "$BaseURL", document_base_url: "$BaseURL",
urlconverter_callback : "nullConverter", urlconverter_callback : "nullConverter",

View File

@ -20,7 +20,7 @@ $lang['en_US']['AssetAdmin']['NOWBROKEN'] = 'The following pages now have broken
$lang['en_US']['AssetAdmin']['NOWBROKEN2'] = 'Their owners have been emailed and they will fix up those pages.'; $lang['en_US']['AssetAdmin']['NOWBROKEN2'] = 'Their owners have been emailed and they will fix up those pages.';
$lang['en_US']['AssetAdmin']['SAVEDFILE'] = 'Saved file %s'; $lang['en_US']['AssetAdmin']['SAVEDFILE'] = 'Saved file %s';
$lang['en_US']['AssetAdmin']['SAVEFOLDERNAME'] = 'Save folder name'; $lang['en_US']['AssetAdmin']['SAVEFOLDERNAME'] = 'Save folder name';
$lang['en_US']['AssetAdmin']['THUMBSDELETED'] = 'All unused thumbnails have been deleted'; $lang['en_US']['AssetAdmin']['THUMBSDELETED'] = '%s unused thumbnails have been deleted';
$lang['en_US']['AssetAdmin']['UPLOAD'] = 'Upload Files Listed Below'; $lang['en_US']['AssetAdmin']['UPLOAD'] = 'Upload Files Listed Below';
$lang['en_US']['AssetAdmin']['UPLOADEDX'] = 'Uploaded %s files'; $lang['en_US']['AssetAdmin']['UPLOADEDX'] = 'Uploaded %s files';
$lang['en_US']['AssetAdmin_left.ss']['CREATE'] = 'Create'; $lang['en_US']['AssetAdmin_left.ss']['CREATE'] = 'Create';
@ -423,7 +423,7 @@ $lang['en_US']['ModelAdmin_ImportSpec.ss']['IMPORTSPECTITLE'] = 'Specification f
$lang['en_US']['ModelAdmin_left.ss']['ADDLISTING'] = 'Add'; $lang['en_US']['ModelAdmin_left.ss']['ADDLISTING'] = 'Add';
$lang['en_US']['ModelAdmin_left.ss']['IMPORT_TAB_HEADER'] = 'Import'; $lang['en_US']['ModelAdmin_left.ss']['IMPORT_TAB_HEADER'] = 'Import';
$lang['en_US']['ModelAdmin_left.ss']['SEARCHLISTINGS'] = 'Search'; $lang['en_US']['ModelAdmin_left.ss']['SEARCHLISTINGS'] = 'Search';
$lang['en_US']['ModelAdmin_right.ss']['WELCOME1'] = 'Welcome to %s. Please choose on one of the entries in the left pane.'; $lang['en_US']['ModelAdmin_right.ss']['WELCOME1'] = 'Welcome to %s. Please choose one of the entries in the left pane.';
$lang['en_US']['PageComment']['COMMENTBY'] = array( $lang['en_US']['PageComment']['COMMENTBY'] = array(
'Comment by \'%s\' on %s', 'Comment by \'%s\' on %s',
PR_MEDIUM, PR_MEDIUM,

View File

@ -1,29 +1,30 @@
<h2><% _t('SECGROUPS','Security Groups') %></h2> <h2><% _t('SECGROUPS','Security Groups') %></h2>
<div id="treepanes" style="overflow-y: auto;">
<ul id="TreeActions">
<li class="action" id="addgroup"><button><% _t('CREATE','Create') %></button></li>
<li class="action" id="deletegroup"><button><% _t('DEL','Delete') %></button></li>
</ul>
<div style="clear:both;"></div>
<form class="actionparams" id="addgroup_options" style="display: none" action="admin/security/addgroup">
<input type="hidden" name="ParentID" />
<input class="action" type="submit" value="<% _t('GO','Go') %>" />
</form>
<form class="actionparams" id="deletegroup_options" style="display: none" action="admin/security/deleteitems">
<p><% _t('SELECT','Select the pages that you want to delete and then click the button below') %></p>
<input type="hidden" name="csvIDs" />
<input type="submit" value="<% _t('DELGROUPS','Delete the selected groups') %>" />
</form>
<form class="actionparams" id="sortitems_options" style="display: none" action="">
<p id="sortitems_message" style="margin: 0"><% _t('TOREORG','To reorganise your site, drag the pages around as desired.') %></p>
</form>
<div id="SortItems"> <div id="treepanes" style="overflow-y: auto;">
<input type="checkbox" id="sortitems" /> <label for="sortitems"><% _t('ENABLEDRAGGING','Allow drag &amp; drop reordering', PR_HIGH) %></label> <ul id="TreeActions">
</div> <li class="action" id="addgroup"><button><% _t('CREATE','Create') %></button></li>
<li class="action" id="deletegroup"><button><% _t('DEL','Delete') %></button></li>
</ul>
<div style="clear:both;"></div>
<form class="actionparams" id="addgroup_options" style="display: none" action="admin/security/addgroup">
<input type="hidden" name="ParentID" />
<input class="action" type="submit" value="<% _t('GO','Go') %>" />
</form>
<form class="actionparams" id="deletegroup_options" style="display: none" action="admin/security/deleteitems">
<p><% _t('SELECT','Select the pages that you want to delete and then click the button below') %></p>
$SiteTreeAsUL <input type="hidden" name="csvIDs" />
<input type="submit" value="<% _t('DELGROUPS','Delete the selected groups') %>" />
</form>
<form class="actionparams" id="sortitems_options" style="display: none" action="">
<p id="sortitems_message" style="margin: 0"><% _t('TOREORG','To reorganise your site, drag the pages around as desired.') %></p>
</form>
<div id="SortItems">
<input type="checkbox" id="sortitems" /> <label for="sortitems"><% _t('ENABLEDRAGGING','Allow drag &amp; drop reordering', PR_HIGH) %></label>
</div>
$SiteTreeAsUL
</div> </div>

View File

@ -41,7 +41,7 @@
<a href="$ApplicationLink" title="<% _t('SSWEB','Silverstripe Website') %>">$ApplicationName</a>&nbsp;-&nbsp; <a href="$ApplicationLink" title="<% _t('SSWEB','Silverstripe Website') %>">$ApplicationName</a>&nbsp;-&nbsp;
<abbr style="border-style: none" title="<% _t('APPVERSIONTEXT1',"This is the") %> $ApplicationName <% _t('APPVERSIONTEXT2',"version that you are currently running, technically it's the CVS branch") %>">$CMSVersion</abbr> &nbsp; &nbsp; &nbsp; <abbr style="border-style: none" title="<% _t('APPVERSIONTEXT1',"This is the") %> $ApplicationName <% _t('APPVERSIONTEXT2',"version that you are currently running, technically it's the CVS branch") %>">$CMSVersion</abbr> &nbsp; &nbsp; &nbsp;
<% control CurrentMember %> <% control CurrentMember %>
<% _t('LOGGEDINAS','Logged in as') %> <strong><% if FirstName && Surname %>$FirstName $Surname<% else_if FirstName %>$FirstName<% else %>$Email<% end_if %></strong> | <a href="{$BaseHref}admin/myprofile" id="EditMemberProfile"><% _t('EDITPROFILE','Profile') %></a> | <a href="Security/logout" id="LogoutLink"><% _t('LOGOUT','log out') %></a> <% _t('LOGGEDINAS','Logged in as') %> <strong><% if FirstName && Surname %>$FirstName $Surname<% else_if FirstName %>$FirstName<% else %>$Email<% end_if %></strong> | <a href="{$BaseHref}admin/myprofile" id="EditMemberProfile"><% _t('EDITPROFILE','Profile') %></a> | <a href="Security/logout" id="LogoutLink"><% _t('LOGOUT','Log out') %></a>
<% end_control %> <% end_control %>
</div> </div>