Widgets now no longer include their alias in getId() if it matches the default alias
This commit is contained in:
parent
4dd74b923b
commit
c3c1e1b6f6
|
|
@ -7,39 +7,39 @@ $(document).ready(function(){
|
|||
|
||||
editorEl.height($('#editorSettingsForm').height() - 23)
|
||||
|
||||
$('#Form-form-field-EditorSettings-theme').on('change', function(){
|
||||
$('#Form-field-EditorSettings-theme').on('change', function(){
|
||||
editorEl.codeEditor('setTheme', $(this).val())
|
||||
})
|
||||
|
||||
$('#Form-form-field-EditorSettings-font_size').on('change', function(){
|
||||
$('#Form-field-EditorSettings-font_size').on('change', function(){
|
||||
editor.setFontSize(parseInt($(this).val()))
|
||||
})
|
||||
|
||||
$('#Form-form-field-EditorSettings-word_wrap').on('change', function(){
|
||||
$('#Form-field-EditorSettings-word_wrap').on('change', function(){
|
||||
editorEl.codeEditor('setWordWrap', $(this).val())
|
||||
})
|
||||
|
||||
$('#Form-form-field-EditorSettings-code_folding').on('change', function(){
|
||||
$('#Form-field-EditorSettings-code_folding').on('change', function(){
|
||||
session.setFoldStyle($(this).val())
|
||||
})
|
||||
|
||||
$('#Form-form-field-EditorSettings-tab_size').on('change', function(){
|
||||
$('#Form-field-EditorSettings-tab_size').on('change', function(){
|
||||
session.setTabSize($(this).val())
|
||||
})
|
||||
|
||||
$('#Form-form-field-EditorSettings-show_invisibles').on('change', function(){
|
||||
$('#Form-field-EditorSettings-show_invisibles').on('change', function(){
|
||||
editor.setShowInvisibles($(this).is(':checked'))
|
||||
})
|
||||
|
||||
$('#Form-form-field-EditorSettings-highlight_active_line').on('change', function(){
|
||||
$('#Form-field-EditorSettings-highlight_active_line').on('change', function(){
|
||||
editor.setHighlightActiveLine($(this).is(':checked'))
|
||||
})
|
||||
|
||||
$('#Form-form-field-EditorSettings-use_hard_tabs').on('change', function(){
|
||||
$('#Form-field-EditorSettings-use_hard_tabs').on('change', function(){
|
||||
session.setUseSoftTabs(!$(this).is(':checked'))
|
||||
})
|
||||
|
||||
$('#Form-form-field-EditorSettings-show_gutter').on('change', function(){
|
||||
$('#Form-field-EditorSettings-show_gutter').on('change', function(){
|
||||
renderer.setShowGutter($(this).is(':checked'))
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -123,7 +123,11 @@ abstract class WidgetBase
|
|||
*/
|
||||
public function getId($suffix = null)
|
||||
{
|
||||
$id = Str::getRealClass(get_called_class()) . '-' . $this->alias;
|
||||
$id = Str::getRealClass(get_called_class());
|
||||
|
||||
if ($this->alias != $this->defaultAlias)
|
||||
$id .= '-' . $this->alias;
|
||||
|
||||
if ($suffix !== null)
|
||||
$id .= '-' . $suffix;
|
||||
|
||||
|
|
@ -229,7 +233,9 @@ abstract class WidgetBase
|
|||
*/
|
||||
protected function makeSessionId()
|
||||
{
|
||||
return 'widget.' . $this->controller->getId() . '-' . $this->getId();
|
||||
// Removes Class name and "Controllers" directory
|
||||
$rootNamespace = Str::getClassId(Str::getClassNamespace(Str::getClassNamespace($this->controller)));
|
||||
return 'widget.' . $rootNamespace . '-' . $this->controller->getId() . '-' . $this->getId();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue