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@71276 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
77353d7e4f
commit
34a50e3de6
@ -81,7 +81,6 @@ class AssetAdmin extends LeftAndMain {
|
||||
|
||||
Requirements::javascript(CMS_DIR . "/javascript/CMSMain_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 . "/greybox/AmiJS.js");
|
||||
@ -142,7 +141,7 @@ JS
|
||||
new HiddenField("ID", "", $this->currentPageID()),
|
||||
// needed because the button-action is triggered outside the iframe
|
||||
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',"
|
||||
<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.
|
||||
*/
|
||||
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) {
|
||||
$parentObj = DataObject::get_by_id('File', $parent);
|
||||
@ -487,8 +487,8 @@ JS;
|
||||
|
||||
$p = new Folder();
|
||||
$p->ParentID = $parent;
|
||||
$p->Title = _t('AssetAdmin.NEWFOLDER',"NewFolder");
|
||||
$p->Name = _t('AssetAdmin.NEWFOLDER', 'NewFolder');
|
||||
$p->Title = $name;
|
||||
$p->Name = $name;
|
||||
|
||||
// Get the folder to be created
|
||||
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() {
|
||||
foreach($this->getUnusedThumbnailsArray() as $file) {
|
||||
unlink(ASSETS_PATH . "/" . $file);
|
||||
}
|
||||
echo "statusMessage('"._t('AssetAdmin.THUMBSDELETED', 'All unused thumbnails have been deleted')."','good')";
|
||||
public function deleteunusedthumbnails() {
|
||||
$count = 0;
|
||||
$thumbnails = $this->getUnusedThumbnails();
|
||||
|
||||
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.
|
||||
*
|
||||
* Array is created in three steps:
|
||||
* 1.Scan assets folder and retrieve all thumbnails
|
||||
* 2.Scan all HTMLField in system and retrieve thumbnails from them.
|
||||
* 3.Count difference between two sets (array_diff)
|
||||
* 1. Scan assets folder and retrieve all thumbnails
|
||||
* 2. Scan all HTMLField in system and retrieve thumbnails from them.
|
||||
* 3. Count difference between two sets (array_diff)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function getUnusedThumbnailsArray() {
|
||||
private function getUnusedThumbnails() {
|
||||
$allThumbnails = array();
|
||||
$usedThumbnails = array();
|
||||
$dirIterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(ASSETS_PATH));
|
||||
$classes = ClassInfo::subclassesFor('SiteTree');
|
||||
|
||||
foreach($dirIterator as $file) {
|
||||
if($file->isFile()) {
|
||||
if(strpos($file->getPathname(),"_resampled") !== false) {
|
||||
$pathInfo = pathinfo($file->getPathname());
|
||||
if(in_array(strtolower($pathInfo['extension']), array('jpeg', 'jpg', 'jpe', 'png', 'gif'))) {
|
||||
$path = str_replace('\\','/', $file->getPathname());
|
||||
$allThumbnails[] = substr($path, strpos($path, '/assets/') + 8);
|
||||
if($dirIterator) {
|
||||
foreach($dirIterator as $file) {
|
||||
if($file->isFile()) {
|
||||
if(strpos($file->getPathname(), '_resampled') !== false) {
|
||||
$pathInfo = pathinfo($file->getPathname());
|
||||
if(in_array(strtolower($pathInfo['extension']), array('jpeg', 'jpg', 'jpe', 'png', 'gif'))) {
|
||||
$path = str_replace('\\','/', $file->getPathname());
|
||||
$allThumbnails[] = substr($path, strpos($path, '/assets/') + 8);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$classes = ClassInfo::subclassesFor('SiteTree');
|
||||
|
||||
foreach($classes as $className) {
|
||||
$sng = singleton($className);
|
||||
$objects = DataObject::get($className);
|
||||
if($objects !== NULL) {
|
||||
foreach($objects as $object) {
|
||||
foreach($sng->db() as $fieldName => $fieldType) {
|
||||
if($fieldType == 'HTMLText') {
|
||||
$url1 = HTTP::findByTagAndAttribute($object->$fieldName,array("img" => "src"));
|
||||
if($url1 != NULL) $usedThumbnails[] = substr($url1[0],strpos($url1[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);
|
||||
if($classes) {
|
||||
foreach($classes as $className) {
|
||||
$SNG_class = singleton($className);
|
||||
$objects = DataObject::get($className);
|
||||
|
||||
if($objects !== NULL) {
|
||||
foreach($objects as $object) {
|
||||
foreach($SNG_class->db() as $fieldName => $fieldType) {
|
||||
if($fieldType == 'HTMLText') {
|
||||
$url1 = HTTP::findByTagAndAttribute($object->$fieldName,array('img' => 'src'));
|
||||
|
||||
if($url1 != NULL) {
|
||||
$usedThumbnails[] = substr($url1[0], strpos($url1[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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
@ -65,9 +65,10 @@ class MemberTableField extends ComplexTableField {
|
||||
}
|
||||
|
||||
$sourceClass = $this->stat('data_class');
|
||||
$SNG_member = singleton($this->stat('data_class'));
|
||||
|
||||
foreach(self::$addedPermissions as $permission) {
|
||||
array_push( $this->permissions, $permission );
|
||||
array_push($this->permissions, $permission);
|
||||
}
|
||||
|
||||
$fieldList = array(
|
||||
@ -75,12 +76,14 @@ class MemberTableField extends ComplexTableField {
|
||||
"Surname" => _t('MemberTableField.SURNAME', 'Surname'),
|
||||
"Email" => _t('MemberTableField.EMAIL', 'Email')
|
||||
);
|
||||
|
||||
$memberDbFields = $SNG_member->db();
|
||||
$csvFieldList = array();
|
||||
|
||||
$csvFieldList = $fieldList;
|
||||
foreach(self::$addedCsvFields as $key => $value) {
|
||||
$csvFieldList[$key] = $value;
|
||||
foreach($memberDbFields as $field => $dbFieldType) {
|
||||
$csvFieldList[$field] = $field;
|
||||
}
|
||||
|
||||
|
||||
foreach(self::$addedFields as $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_popup.js");
|
||||
|
||||
$SNG_member = singleton($this->stat('data_class'));
|
||||
|
||||
// search
|
||||
$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->setFieldListCsv( $csvFieldList );
|
||||
$this->setFieldListCsv($csvFieldList);
|
||||
}
|
||||
|
||||
function sourceID() {
|
||||
@ -325,7 +326,9 @@ class MemberTableField extends ComplexTableField {
|
||||
$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;
|
||||
|
||||
return $this->sourceItems;
|
||||
|
@ -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() {
|
||||
$newRecord = new $this->modelClass();
|
||||
|
||||
if($newRecord->canCreate()){
|
||||
if($newRecord->hasMethod('getCMSAddFormFields')) {
|
||||
$fields = $newRecord->getCMSAddFormFields();
|
||||
} else {
|
||||
$fields = $newRecord->getCMSFields();
|
||||
}
|
||||
|
||||
|
||||
$validator = ($newRecord->hasMethod('getCMSValidator')) ? $newRecord->getCMSValidator() : null;
|
||||
|
||||
$actions = new FieldSet(
|
||||
|
||||
$actions = new FieldSet (
|
||||
new FormAction("doCreate", _t('ModelAdmin.ADDBUTTON', "Add"))
|
||||
);
|
||||
|
||||
|
||||
$form = new Form($this, "AddForm", $fields, $actions, $validator);
|
||||
|
||||
$form->loadDataFrom($newRecord);
|
||||
|
||||
return $form;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function doCreate($data, $form, $request) {
|
||||
$className = $this->getModelClass();
|
||||
|
@ -23,7 +23,8 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
|
||||
'removememberfromgroup',
|
||||
'savemember',
|
||||
'AddRecordForm',
|
||||
'MemberForm'
|
||||
'MemberForm',
|
||||
'EditForm'
|
||||
);
|
||||
|
||||
public function init() {
|
||||
@ -232,4 +233,4 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
@ -179,7 +179,7 @@ class PageComment_Controller extends Controller {
|
||||
}
|
||||
}
|
||||
|
||||
function approve() {
|
||||
function approve() {
|
||||
if(Permission::check('CMS_ACCESS_CMSMain')) {
|
||||
$comment = DataObject::get_by_id("PageComment", $this->urlParams['ID']);
|
||||
$comment->NeedsModeration = false;
|
||||
|
@ -1,6 +1,9 @@
|
||||
#right form .inlineformaction {
|
||||
margin-left: 0;
|
||||
}
|
||||
#right form #deletemarked .middleColumn {
|
||||
background: none;
|
||||
}
|
||||
.dragfile,
|
||||
.dragfile img {
|
||||
float: left;
|
||||
|
@ -232,6 +232,7 @@ ul.tree span.a span.modified,
|
||||
.listpane div.unitBody {
|
||||
overflow: auto;
|
||||
width: 100%;
|
||||
clear: left;
|
||||
}
|
||||
|
||||
.listpane li a {
|
||||
|
@ -23,7 +23,7 @@
|
||||
}
|
||||
|
||||
.right form .field {
|
||||
/*margin: 3px !important;*/
|
||||
border: none;
|
||||
margin: 0;
|
||||
}
|
||||
.right form .text,
|
||||
@ -137,6 +137,40 @@
|
||||
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 .optionset input,
|
||||
.right form .htmleditor select,
|
||||
@ -159,7 +193,7 @@
|
||||
float: left;
|
||||
}
|
||||
.right form .optionset li.submit {
|
||||
text-align: right;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.right form h1 {
|
||||
@ -273,10 +307,13 @@
|
||||
* Autocomplete
|
||||
*/
|
||||
.autocomplete {
|
||||
margin-left: 1px;
|
||||
background: white;
|
||||
overflow: visible;
|
||||
}
|
||||
.autocomplete ul {
|
||||
border: 1px solid #aaa;
|
||||
background: #FFFFBB;
|
||||
}
|
||||
.autocomplete li {
|
||||
list-style-type: none;
|
||||
@ -331,11 +368,11 @@
|
||||
|
||||
/* Filter box (for search/filter box above a table on Asset/MemberTableField) */
|
||||
div.filterBox {
|
||||
width: 33em;
|
||||
width: inherit;
|
||||
margin: 5px 0;
|
||||
padding: 5px;
|
||||
background: #ebeadb;
|
||||
border: 1px solid #aca899;
|
||||
background: #EEE;
|
||||
border: 1px solid #BBB;
|
||||
}
|
||||
div.filterBox .middleColumn {
|
||||
background: none !important;
|
||||
|
@ -518,6 +518,7 @@ iframe {
|
||||
margin: -5px -5px 0 -5px;
|
||||
}
|
||||
#contentPanel .thumbnailstrip h2 {
|
||||
font-size: 1.1em;
|
||||
margin: 0;
|
||||
background: none;
|
||||
color: #555;
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 271 B After Width: | Height: | Size: 175 B |
@ -484,7 +484,7 @@ Behaviour.register({
|
||||
eval(t.responseText);
|
||||
}
|
||||
};
|
||||
new Ajax.Request('admin/assets/deleteUnusedThumbnails',options);
|
||||
new Ajax.Request('admin/assets/deleteunusedthumbnails',options);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -111,17 +111,7 @@ CMSMain_upload.prototype = {
|
||||
fileProgress.style.left = '5px';
|
||||
fileProgress.style.width = '0px';
|
||||
fileProgress.finished = false;
|
||||
switch(BrowserDetect.browser) {
|
||||
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.top = parseInt(fileProgress.style.top) + 6 + 'px';
|
||||
fileProgress.style.height = Element.getDimensions(fileName).height + 1 + 'px';
|
||||
fileToUpload.appendChild(fileProgress);
|
||||
|
||||
|
@ -131,8 +131,8 @@ MemberTableField.prototype = {
|
||||
updateURL = "";
|
||||
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
|
||||
updateURL += "&fieldName="+$('MemberFieldName').value;
|
||||
updateURL += "&action_callfieldmethod&&methodName=addtogroup&";
|
||||
updateURL += "?fieldName="+$('MemberFieldName').value;
|
||||
updateURL += "&action_callfieldmethod&methodName=addtogroup";
|
||||
|
||||
ajaxSubmitFieldSet(updateURL, data);
|
||||
}
|
||||
@ -276,4 +276,4 @@ MemberFilterButton.prototype = {
|
||||
// has to be external from initialize() because otherwise request will double on each reload - WTF
|
||||
Behaviour.register({
|
||||
'#Form_EditForm div.MemberTableField table.data input' : AjaxMemberLookup
|
||||
});
|
||||
});
|
||||
|
@ -5,7 +5,5 @@ function action_addmember_right() {
|
||||
var memberTableFields = document.getElementsBySelector('#Form_EditForm div.MemberTableField');
|
||||
var tables = document.getElementsBySelector('#Form_EditForm div.MemberTableField table');
|
||||
var addLinks = document.getElementsBySelector('#Form_EditForm div.MemberTableField a.addlink');
|
||||
try {
|
||||
memberTableFields[0].openPopup(null,addLinks[0].href,tables[0]);
|
||||
} catch(err) {}
|
||||
memberTableFields[0].openPopup(null,addLinks[0].href,tables[0]);
|
||||
}
|
@ -12,7 +12,6 @@ TinyMCEImageEnhancement.prototype = {
|
||||
|
||||
addListeners: function() {
|
||||
$('Form_EditorToolbarImageForm_FolderID').value = "";
|
||||
|
||||
Event.observe($('AddFolder'),'click',this.onAddFolder.bind(this));
|
||||
Event.observe($('FolderOk'),'click',this.onFolderOk.bind(this));
|
||||
Event.observe($('FolderCancel'),'click',this.onFolderCancel.bind(this));
|
||||
@ -74,7 +73,7 @@ TinyMCEImageEnhancement.prototype = {
|
||||
var folderName = $('NewFolderName').value;
|
||||
var options = {
|
||||
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),
|
||||
onFailure: function(transport) {
|
||||
errorMessage('Error: Folder not added', transport);
|
||||
@ -105,30 +104,13 @@ TinyMCEImageEnhancement.prototype = {
|
||||
|
||||
this.folderID = folderID;
|
||||
|
||||
var options = {
|
||||
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');
|
||||
statusMessage('Creating new folder');
|
||||
$('TreeDropdownField_Form_EditorToolbarImageForm_FolderID').itemTree = null;
|
||||
$('TreeDropdownField_Form_EditorToolbarImageForm_FolderID').setValue(this.folderID);
|
||||
$('NewFolderName').value = '';
|
||||
Element.show('AddFolder');
|
||||
Element.hide('NewFolderName','FolderOk','FolderCancel');
|
||||
this.removeIE6Hack();
|
||||
this.removeIE6Hack();
|
||||
},
|
||||
|
||||
/**
|
||||
@ -140,6 +122,8 @@ TinyMCEImageEnhancement.prototype = {
|
||||
Element.show('AddFolder');
|
||||
Element.hide('NewFolderName','FolderOk','FolderCancel');
|
||||
this.removeIE6Hack();
|
||||
Event.stop(event);
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
@ -147,10 +131,12 @@ TinyMCEImageEnhancement.prototype = {
|
||||
*/
|
||||
|
||||
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) {
|
||||
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($('PipeSeparator')) $('PipeSeparator').style.display = 'none';
|
||||
if($('UploadGroup')) $('UploadGroup').style.display = 'none';
|
||||
@ -251,7 +237,7 @@ TinyMCEImageEnhancement.prototype = {
|
||||
*/
|
||||
|
||||
applyIE6Hack: function() {
|
||||
if(BrowserDetect.browser == 'Explorer') {
|
||||
if(/msie/i.test(navigator.userAgent)) {
|
||||
elements = [$('FolderOk'),$('FolderCancel'),$('UploadFiles')];
|
||||
$A(elements).each(function(element) {
|
||||
element.style.position = "relative";
|
||||
@ -261,7 +247,7 @@ TinyMCEImageEnhancement.prototype = {
|
||||
},
|
||||
|
||||
removeIE6Hack: function() {
|
||||
if(BrowserDetect.browser == 'Explorer') {
|
||||
if(/msie/i.test(navigator.userAgent)) {
|
||||
elements = [$('FolderOk'),$('FolderCancel'),$('UploadFiles')];
|
||||
$A(elements).each(function(element) {
|
||||
element.style.position = "";
|
||||
|
@ -14,7 +14,7 @@ if((typeof tinyMCE != 'undefined')) {
|
||||
width: "100%",
|
||||
auto_resize : false,
|
||||
theme : "advanced",
|
||||
content_css : "$ContentCSS",
|
||||
content_css : "cms/css/editor.css, $ContentCSS",
|
||||
body_class : 'typography',
|
||||
document_base_url: "$BaseURL",
|
||||
urlconverter_callback : "nullConverter",
|
||||
|
@ -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']['SAVEDFILE'] = 'Saved file %s';
|
||||
$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']['UPLOADEDX'] = 'Uploaded %s files';
|
||||
$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']['IMPORT_TAB_HEADER'] = 'Import';
|
||||
$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(
|
||||
'Comment by \'%s\' on %s',
|
||||
PR_MEDIUM,
|
||||
|
@ -1,29 +1,30 @@
|
||||
<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">
|
||||
<input type="checkbox" id="sortitems" /> <label for="sortitems"><% _t('ENABLEDRAGGING','Allow drag & drop reordering', PR_HIGH) %></label>
|
||||
</div>
|
||||
<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>
|
||||
|
||||
$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 & drop reordering', PR_HIGH) %></label>
|
||||
</div>
|
||||
|
||||
$SiteTreeAsUL
|
||||
</div>
|
@ -41,7 +41,7 @@
|
||||
<a href="$ApplicationLink" title="<% _t('SSWEB','Silverstripe Website') %>">$ApplicationName</a> -
|
||||
<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>
|
||||
<% 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 %>
|
||||
</div>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user