mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
Added _manifest_exclude to lang folder (merged from branches/gsoc)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@42577 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
bc246bf484
commit
d3cc97c8a0
@ -425,7 +425,7 @@ JS;
|
|||||||
$originalItem = Translatable::get_original($className,Session::get("{$id}_originalLangID"));
|
$originalItem = Translatable::get_original($className,Session::get("{$id}_originalLangID"));
|
||||||
if ($setID) $originalItem->ID = $id;
|
if ($setID) $originalItem->ID = $id;
|
||||||
else {
|
else {
|
||||||
$originalItem->ID = 'new'; // to avoid creating and deleting a SiteTree row
|
$originalItem->ID = null;
|
||||||
Translatable::creating_from(Session::get($id.'_originalLangID'));
|
Translatable::creating_from(Session::get($id.'_originalLangID'));
|
||||||
}
|
}
|
||||||
return $originalItem;
|
return $originalItem;
|
||||||
|
@ -366,11 +366,11 @@ JS;
|
|||||||
$className = $this->stat('tree_class');
|
$className = $this->stat('tree_class');
|
||||||
$result = '';
|
$result = '';
|
||||||
|
|
||||||
$id = $_REQUEST['ID'];
|
$SQL_id = Convert::raw2sql($_REQUEST['ID']);
|
||||||
if(substr($id,0,3) != 'new') {
|
if(substr($SQL_id,0,3) != 'new') {
|
||||||
$record = DataObject::get_one($className, "`$className`.ID = $id");
|
$record = DataObject::get_one($className, "`$className`.ID = {$SQL_id}");
|
||||||
} else {
|
} else {
|
||||||
$record = $this->getNewItem($id, false);
|
$record = $this->getNewItem($SQL_id, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// We don't want to save a new version if there are no changes
|
// We don't want to save a new version if there are no changes
|
||||||
@ -428,8 +428,8 @@ JS;
|
|||||||
// $record->write();
|
// $record->write();
|
||||||
|
|
||||||
if(Director::is_ajax()) {
|
if(Director::is_ajax()) {
|
||||||
if($id != $record->ID) {
|
if($SQL_id != $record->ID) {
|
||||||
FormResponse::add("$('sitetree').setNodeIdx(\"$id\", \"$record->ID\");");
|
FormResponse::add("$('sitetree').setNodeIdx(\"{$SQL_id}\", \"$record->ID\");");
|
||||||
FormResponse::add("$('Form_EditForm').elements.ID.value = \"$record->ID\";");
|
FormResponse::add("$('Form_EditForm').elements.ID.value = \"$record->ID\";");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -486,10 +486,13 @@ JS;
|
|||||||
// If the 'Save & Publish' button was clicked, also publish the page
|
// If the 'Save & Publish' button was clicked, also publish the page
|
||||||
if (isset($urlParams['publish']) && $urlParams['publish'] == 1) {
|
if (isset($urlParams['publish']) && $urlParams['publish'] == 1) {
|
||||||
$this->performPublish($record);
|
$this->performPublish($record);
|
||||||
// BUGFIX: Changed icon sometimes shows after "Save & Publish" button is clicked http://support.silverstripe.com/gsoc/ticket/31
|
|
||||||
$record->setClassName( $record->ClassName );
|
if(substr($SQL_id,0,3) != 'new') {
|
||||||
$newClass = $record->ClassName;
|
$publishedRecord = DataObject::get_one($className, "`$className`.ID = {$SQL_id}");
|
||||||
$publishedRecord = $record->newClassInstance( $newClass );
|
} else {
|
||||||
|
$publishedRecord = $this->getNewItem($SQL_id, false);
|
||||||
|
}
|
||||||
|
|
||||||
return $this->tellBrowserAboutPublicationChange($publishedRecord, "Published '$record->Title' successfully");
|
return $this->tellBrowserAboutPublicationChange($publishedRecord, "Published '$record->Title' successfully");
|
||||||
} else {
|
} else {
|
||||||
// BUGFIX: Changed icon only shows after Save button is clicked twice http://support.silverstripe.com/gsoc/ticket/76
|
// BUGFIX: Changed icon only shows after Save button is clicked twice http://support.silverstripe.com/gsoc/ticket/76
|
||||||
|
@ -1,54 +1,48 @@
|
|||||||
var _TRANSLATING_LANG = null;
|
var _TRANSLATING_LANG = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
LangSelector = Class.create();
|
LangSelector = Class.create();
|
||||||
LangSelector.prototype = {
|
LangSelector.prototype = {
|
||||||
|
|
||||||
initialize: function() {
|
initialize: function() {
|
||||||
this.selector = $('LangSelector');
|
if(this.selectedIndex != 0) {
|
||||||
//this.selector.addEventListener("click", this.a, null);
|
|
||||||
|
|
||||||
if(this.selector) this.selector.holder = this;
|
|
||||||
if(this.selector.selectedIndex != 0) {
|
|
||||||
this.showlangtree();
|
this.showlangtree();
|
||||||
_TRANSLATING_LANG = this.selector.value;
|
_TRANSLATING_LANG = this.value;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
destroy: function() {
|
|
||||||
if(this.selector) this.selector.holder = null;
|
|
||||||
this.selector = null;
|
|
||||||
},
|
|
||||||
|
|
||||||
onshow: function() {
|
onshow: function() {
|
||||||
if(this.selector.value) this.showlangtree();
|
if(this.value) this.showlangtree();
|
||||||
},
|
},
|
||||||
|
|
||||||
onchange: function() {
|
onchange: function(e, val) {
|
||||||
if (this.selector.value != _TRANSLATING_LANG) {
|
if(this.value != _TRANSLATING_LANG) {
|
||||||
if (this.selector.selectedIndex != 0) _TRANSLATING_LANG = this.selector.value;
|
_TRANSLATING_LANG = this.value;
|
||||||
else _TRANSLATING_LANG = null;
|
|
||||||
this.showlangtree();
|
this.showlangtree();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
selectValue: function(lang) {
|
selectValue: function(lang) {
|
||||||
this.selector.value = lang;
|
this.value = lang;
|
||||||
if (this.selector.value != lang) {
|
if(this.value != lang) {
|
||||||
var newLang = document.createElement('option');
|
var newLang = document.createElement('option');
|
||||||
newLang.text = lang;
|
newLang.text = lang;
|
||||||
newLang.value = lang;
|
newLang.value = lang;
|
||||||
try {
|
try {
|
||||||
this.selector.add(newLang, null); // standards compliant
|
this.add(newLang, null); // standards compliant
|
||||||
} catch(ex) {
|
} catch(ex) {
|
||||||
this.selector.add(newLang); // IE only
|
this.add(newLang); // IE only
|
||||||
}
|
}
|
||||||
this.selector.value = lang;
|
this.value = lang;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
showlangtree: function() {
|
showlangtree: function() {
|
||||||
|
if(this.value) {
|
||||||
$('sitetree').innerHTML=' <img src="cms/images/network-save.gif> loading...';
|
$('sitetree').innerHTML=' <img src="cms/images/network-save.gif> loading...';
|
||||||
if(this.selector.value) {
|
new Ajax.Request('admin/switchlanguage/' + this.value, {
|
||||||
new Ajax.Request('admin/switchlanguage/' + this.selector.value, {
|
|
||||||
method : 'post',
|
method : 'post',
|
||||||
onSuccess: Ajax.Evaluator,
|
onSuccess: Ajax.Evaluator,
|
||||||
onFailure : Ajax.Evaluator
|
onFailure : Ajax.Evaluator
|
||||||
@ -56,9 +50,11 @@ LangSelector.prototype = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
LangSelector.applyTo('#LangSelector');
|
LangSelector.applyTo('#LangSelector');
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
TranslatorCreator = Class.create();
|
TranslatorCreator = Class.create();
|
||||||
TranslatorCreator.prototype = {
|
TranslatorCreator.prototype = {
|
||||||
|
|
||||||
@ -75,5 +71,4 @@ TranslatorCreator.prototype = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TranslatorCreator.applyTo('#LangSelector_holder');
|
TranslatorCreator.applyTo('#LangSelector_holder');
|
0
lang/_manifest_exclude
Executable file
0
lang/_manifest_exclude
Executable file
Loading…
Reference in New Issue
Block a user