Jump to:

10843 Posts in 2514 Topics by 1792 members

All other Modules

SilverStripe Forums » All other Modules » EventCalendar DateTime Pop-up problem

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1037 Views
  • Victor
    Avatar
    Community Member
    128 Posts

    EventCalendar DateTime Pop-up problem Link to this post

    I am building a new class Seminar (and SeminarDateTime) on the top of Calendar (and CalendarDateTime) and in SeminarDateTime I add few new fields in comparison with CalendarDateTime

    <?php

    class SeminarDateTime extends CalendarDateTime
    {
    static $db = array (
    'Location' => 'Varchar(100)',
    'Title' => 'HTMLVarchar(200)',
    'Speaker' => 'Varchar(100)',
    'Institution' => 'Varchar(150)',
    'SpeakerWebsite' => 'Varchar(150)',
    'TalkWebsite' => 'Varchar(150)',
    'Abstract' => 'HTMLText',
    'TeXAbstract' => 'HTMLText'
    );

    static $has_one = array (
    'Seminar' => 'Seminar'
    );
    public function extendTable()
    {
    $this->setComplex(true);
    $this->addTableTitles(array(
    'Location' => 'Location','Title' => 'Title', 'Speaker' => 'Speaker', 'Institution' => 'Institution', 'SpeakerWebsite' => 'SpeakerWebsite', 'TalkWebsite' => 'TalkWebsite', 'Abstract' => 'Abstract', 'TeXAbstract' => 'TeXAbstract'
    ));
    $this->addPopupFields(array(
    new TextField('Location'), new TextField('Title'), new TextField('Speaker'), new TextField('Institution'), new TextField('SpeakerWebsite
    '), new TextField('TalkWebsite'), new SimpleHTMLEditorField('Abstract'), new TextareaField('texabstract','TeXAbstract',18, 3,'')
    ));
    }
    }
    ?>

    Everything works fine albeit Textareafield TeXAbstract is not saved! SimpleHTMLEditorField is saved, TextField is saved, but is Textareafield is not and I need TextareaField as SimpleHTMLEditorField inserts <pre> tag, TextField is inconvenient for large input

    Thank you in advance

    Victor

  • UncleCheese
    Avatar
    4085 Posts

    Re: EventCalendar DateTime Pop-up problem Link to this post

    You're using the wrong name on your TextareaField.

    texabstract instead of TeXAbstract

    Also, if TeXAbstract is HTML, you probably want to use an HTML editor, not a Textarea.

  • Victor
    Avatar
    Community Member
    128 Posts

    Re: EventCalendar DateTime Pop-up problem Link to this post

    THANKS!!!

    Stupid me (used wrong case). Now it works

    No, I want really TextareaField fow row code as it is math-TeX-input which passes trough jsMath. Example

    http://weyl.math.toronto.edu:8888/testsite/applied-math-pde-analysis/2010-01-08

    (the whole thing is raw and uncooked but jsMath is hooked up)

    Victor

    1037 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.