Skip to content

Commit

Permalink
Add Heading/Title class and inherit from Forms/Lists
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienheraud committed Feb 20, 2017
1 parent 91e160f commit 5eee0ce
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
1 change: 1 addition & 0 deletions administrator/components/com_cck/config.xml
Expand Up @@ -199,6 +199,7 @@
<option value="-1">COM_CCK_USE_ALTERNATIVE_SL</option>
</field>
<field name="COM_CCK_CONFIG_LEGEND_SCRIPT_STYLE" type="spacer" hr="false" />
<field name="title_class" type="text" size="32" default="" label="COM_CCK_CONFIG_CLASS_TITLE" description="COM_CCK_CONFIG_CLASS_TITLE_DESC" class="inputbox" />
<field name="site_variation" type="cck" construction="core_variation" default="seb_css3" label="COM_CCK_CONFIG_DEFAULT_VARIATION_CONTENT" description="COM_CCK_CONFIG_DEFAULT_VARIATION_CONTENT_DESC" class="inputbox" />
<field name="site_variation_form" type="cck" construction="core_variation" default="seb_css3" label="COM_CCK_CONFIG_DEFAULT_VARIATION_FORM" description="COM_CCK_CONFIG_DEFAULT_VARIATION_FORM_DESC" class="inputbox" />
<field name="site_modal_box_css" type="folderlist" directory="media/cck/scripts/jquery-colorbox/styles" hide_none="1" hide_default="0" default="style0" exclude="style0"
Expand Down
8 changes: 4 additions & 4 deletions components/com_cck/views/form/view.html.php
Expand Up @@ -121,11 +121,11 @@ protected function prepareDisplay( $preconfig )
$this->show_form_title = $params->get( 'show_form_title' );
if ( $this->show_form_title == '' ) {
$this->show_form_title = $options->get( 'show_form_title', '1' );
$this->tag_form_title = $options->get( 'tag_form_title', 'h2' );
$this->class_form_title = $options->get( 'class_form_title' );
$this->tag_form_title = $options->get( 'tag_form_title', 'h1' );
$this->class_form_title = $options->get( 'class_form_title', JCck::getConfig_Param( 'title_class', '' ) );
} elseif ( $this->show_form_title ) {
$this->tag_form_title = $params->get( 'tag_form_title', 'h2' );
$this->class_form_title = $params->get( 'class_form_title' );
$this->tag_form_title = $params->get( 'tag_form_title', 'h1' );
$this->class_form_title = $params->get( 'class_form_title', JCck::getConfig_Param( 'title_class', '' ) );
}
$this->show_form_desc = $params->get( 'show_form_desc' );
if ( $this->show_form_desc == '' ) {
Expand Down
18 changes: 12 additions & 6 deletions components/com_cck/views/list/view.html.php
Expand Up @@ -121,18 +121,24 @@ protected function prepareDisplay( $preconfig )
$this->show_list_title = $params->get( 'show_list_title' );
if ( $this->show_list_title == '' ) {
$this->show_list_title = $options->get( 'show_list_title', '1' );
$this->tag_list_title = $options->get( 'tag_list_title', 'h2' );
$this->class_list_title = $options->get( 'class_list_title' );
$this->tag_list_title = $options->get( 'tag_list_title', 'h1' );
$this->class_list_title = $options->get( 'class_list_title', JCck::getConfig_Param( 'title_class', '' ) );
} elseif ( $this->show_list_title ) {
$this->tag_list_title = $params->get( 'tag_list_title', 'h2' );
$this->class_list_title = $params->get( 'class_list_title' );
$this->tag_list_title = $params->get( 'tag_list_title', 'h1' );
$this->class_list_title = $params->get( 'class_list_title', JCck::getConfig_Param( 'title_class', '' ) );
}
if ( $params->get( 'display_list_title', '' ) == '1' ) {
if ( $params->get( 'display_list_title', '' ) == '2' ) {
$this->title = '';

if ( is_object( $search ) ) {
$this->title = Jtext::_( 'APP_CCK_LIST_'.$search->name.'_TITLE' );
}
} elseif ( $params->get( 'display_list_title', '' ) == '1' ) {
$this->title = $params->get( 'title_list_title', '' );
} elseif ( $params->get( 'display_list_title', '' ) == '0' ) {
$this->title = $menu->title;
} else {
$this->title = @$search->title;
$this->title = ( isset( $search->title ) ) ? $search->title : '';
}

$this->show_list_desc = $params->get( 'show_list_desc' );
Expand Down

0 comments on commit 5eee0ce

Please sign in to comment.