How to add your favorite jQuery UI plugin as a Raxan widget

Imagine you have found the latest jQuery DatePicker that has all of the latest bells & whistles (like the one created by Keith Wood at http://keith-wood.name/datepick.html). Like most jQuery plugins, it comes with the jquery plugin (.js) file, a css file, and an example html file. So, how do you quickly add this to Raxan as a reusable widget? Simple.

Step 1: Copy the jQuery plugin file(s) to the raxan ui/javascripts directory

Step 2: Copy the plugin's css file(s) to the raxan ui/css directory

Step 3: Create the Raxan widget class file

<?php

    class DatePickerWidget extends RaxanUIWidget {

        protected function _init() {
            // load the stylesheet jquery.datepick.css
            $this->page->loadCSS('jquery.datepick');
            // load the javascript
            $this->page->loadScript('jquery.datepick');
            // Bind the datepicker to the element
            // Note that elmID is created in the RaxanUIWidget constructor so it is
            // available here as the jQuery selector
            c('#'.$this->elmId)->datepick();
        }
    }

?> 

Step 4: Load the new DatePickerwidget in your page controller class

<?php
    require_once 'raxan/pdi/autostart.php';
    Raxan::loadWidget('datepickerwidget');

    class IndexPage extends RaxanWebPage {

        protected function _config() {
            $this->masterTemplate ='views/master.html';
        }

        protected function _init() {
            $this->appendView('mypage.html');
        }
    }

?>

Step 5: Start using your new DatePickerWidget in your views

<div class="container">
     <form id="addEmployee" method="post">
        <p>
            <label class="rax-light-title" for="employeeName">Employee Name</label>  
            <input id="employeeName" class="textbox c26 round" />
        </p>
        <p>
            <label class="rax-light-title" for="employeeBirthDate">
            Employee Birth Date</label>
            <br/><input id="employeeBirthDate" 
            class="textbox c17 round" xt-ui="DatePickerWidget" />
        </p>
        <p>
            <input id="cmdAdd" type="submit" class="left button rtm " 
            value="Add Employee" xt-bind="#click,saveEmployee,,true" />       
        </p>
    </form>
</div>

Now, when you want to use the DatePickerWidget on any page, all you have to do is call Raxan::loadWidget('datepickerwidget') in the page controller, and add the xt-ui="DatePickerWidget" on the elements that are used to get dates. Really nice!

burberry bags 2013
Posts: 824
Comment
Yap406
Reply #781 on : Tue April 01, 2014, 23:06:24
Awesome! Its really awesome How to add your favorite jQuery UI plugin as a Raxan widget | Raxan Framework , I have got much clear idea about from this article.
burberry bags 2013 http://wholesalesburberrybags.blogspot.com/
???? ?????
Posts: 824
Comment
Genetic231
Reply #780 on : Thu June 26, 2014, 04:30:08
????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????Labthink VAC V1 ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ??????
???? ????? http://www.forfattarhuset.se/lifenex/bvlgari/index.html
seo plugin
Posts: 824
Comment
Unity760
Reply #779 on : Fri September 19, 2014, 01:57:46
Hello Web Admin, I noticed that your On-Page SEO is is missing a few factors, for one you do not use all three H tags in your post, also I notice that you are not using bold or italics properly in your SEO optimization. On-Page SEO means more now than ever since the new Google update: Panda. No longer are backlinks and simply pinging or sending out a RSS feed the key to getting Google PageRank or Alexa Rankings, You now NEED On-Page SEO. So what is good On-Page SEO?First your keyword must appear in the title.Then it must appear in the URL.You have to optimize your keyword and make sure that it has a nice keyword density of 3-5% in your article with relevant LSI (Latent Semantic Indexing). Then you should spread all H1,H2,H3 tags in your article.Your Keyword should appear in your first paragraph and in the last sentence of the page. You should have relevant usage of Bold and italics of your keyword.There should be one internal link to a page on your blog and you should have one image with an alt tag that has your keyword....wait there's even more Now what if i told you there was a simple Wordpress plugin that does all the On-Page SEO, and automatically for you? That's right AUTOMATICALLY, just watch this 4minute video for more information at. <a href="http://www.WhiteHatSeoRankings.com">Seo Plugin</a>
seo plugin http://www.WhiteHatSeoRankings.com/
Cassie Reagan
Posts: 824
Comment
Cassie Reagan
Reply #778 on : Thu November 13, 2014, 07:22:08
came across this board and I find It truly useful & it helped me out a lot.</br><a href="http://www.tripletaxes.com
">Cassie Reagan</a></br>[url=http://www.tripletaxes.com
]Cassie Reagan[/url]</br>http://www.tripletaxes.com
Cassie Reagan
Posts: 824
Comment
Cassie Reagan
Reply #777 on : Thu November 13, 2014, 08:18:41
gonna be back continuously in order to check out new posts|I wanted to thank you for this very good read!! I definitely enjoyed every bit of it.</br><a href="http://www.tripletaxes.com

">Cassie Reagan</a></br>[url=http://www.tripletaxes.com

]Cassie Reagan[/url]</br>http://www.tripletaxes.com
Cassie Reagan
Posts: 824
Comment
Cassie Reagan
Reply #776 on : Thu November 13, 2014, 09:32:23
Anyways, fantastic site!|Its like you read my mind! You appear to grasp a lot approximately this, such as you wrote the e-book in it or something.</br><a href="http://www.tripletaxes.com


">Cassie Reagan</a></br>[url=http://www.tripletaxes.com


]Cassie Reagan[/url]</br>http://www.tripletaxes.com
Cassie Reagan
Posts: 824
Comment
Cassie Reagan
Reply #775 on : Thu November 13, 2014, 17:05:41
humoristic style is witty, keep doing what you're doing!|I just couldn't leave your website before suggesting that I extremely enjoyed the usual info a person provide on your guests?</br><a href="http://www.tripletaxes.com">Cassie Reagan</a></br>[url=http://www.tripletaxes.com]Cassie Reagan[/url]</br>http://www.tripletaxes.com
Ethelyn Hew
Posts: 824
Comment
Ethelyn Hew
Reply #774 on : Fri November 14, 2014, 05:14:18
website and I look forward to seeing it grow over time.</br><a href="http://www.beveragebuggy.com

">Ethelyn Hew</a></br>[url=http://www.beveragebuggy.com

]Ethelyn Hew[/url]</br>http://www.beveragebuggy.com
Ethelyn Hew
Posts: 824
Comment
Ethelyn Hew
Reply #773 on : Fri November 14, 2014, 07:09:31
Hola! I've been following your website for a while now and finally got the bravery to go ahead and give you a shout out from Austin Texas! Just wanted to say keep up the fantastic work!|Greetings from Florida! I'm bored at work so I decided to browse your site on my iphone during lunch break.</br><a href="http://www.beveragebuggy.com
">Ethelyn Hew</a></br>[url=http://www.beveragebuggy.com
]Ethelyn Hew[/url]</br>http://www.beveragebuggy.com
Ricky Stanuszek
Posts: 824
Comment
Ricky Stanuszek
Reply #772 on : Sat November 15, 2014, 04:51:02
But he's tryiong none the less.</br><a href="http://www.beveragebuggy.com
">Ricky Stanuszek</a></br>[url=http://www.beveragebuggy.com
]Ricky Stanuszek[/url]</br>http://www.beveragebuggy.com
Showing comments 1 to 10 of 781 | Next | Last

Leave a Comment

Required fields are marked with *.
If you have trouble reading the code, click on the code itself to generate a new random code.