Use PrimeUI

jQuery UI Widgets
Post Reply
Babas007
Posts: 251
Joined: 24 May 2011, 09:42

03 Dec 2012, 17:05

Hi everyone,

I tried to use primeUI. For the moment i just want to use panel component.
I included two minified files (css and js). But it does not display the panel, only the content text.
I think I forgot a theme to include as well, but where can I have it?

regards

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

03 Dec 2012, 17:09

You can use any themeroller theme.

http://jqueryui.com/themeroller/

Do you get a javascript error?

Babas007
Posts: 251
Joined: 24 May 2011, 09:42

03 Dec 2012, 20:04

Still does not work, I put this:

Code: Select all

<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/prime-ui-0.3-min.css" media="screen" />
        <link rel="stylesheet" type="text/css" href="http://code.jquery.com/ui/1.9.2/themes/start/jquery-ui.css" />
and this:

Code: Select all

        <script src="js/prime-ui-0.3-min.js"></script>
Not enough?

By the way, where are the images, because I saw this in your css: url(./images/rating.png)

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

04 Dec 2012, 11:22

images are in development folder in 0.3 release, just released 0.4, images folder are both in production and development folders.

Watch out for your css path as well.

Check dom to see if you properly apply widget to the panel div. I don't think you do right now.

Babas007
Posts: 251
Joined: 24 May 2011, 09:42

04 Dec 2012, 19:49

Something is wrong with images path. Why didn't you put the images in the same folder?
Because in the css min, here is the different path:
"../../images/messages.png"
"./images/rating.png"

What are you expecting from us to use as a tree? You should write an How to like you did for PrimeFaces.

It necessary to reference all the sub folders like panel, tabview and so on?

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

04 Dec 2012, 21:12

rating image is not in bundle, should be corrected in next release.

Just put your other images two folders up from css file.

Check out prime-ui showcase as a reference. This is basic web stuff.

http://stackoverflow.com/questions/9404 ... elative-to

Babas007
Posts: 251
Joined: 24 May 2011, 09:42

06 Dec 2012, 13:37

Still does not work, here is my code:
The head: (and path are correct)

Code: Select all

    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="language" content="fr" />
        <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/main.css" media="screen" />
        <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/bootstrap.min.css" />
        <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/prime-ui-0.3-min.css" />
        <link rel="stylesheet" type="text/css" href="http://code.jquery.com/ui/1.9.2/themes/start/jquery-ui.css" />

        <script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
        <script src="js/bootstrap.min.js"></script>
        <script src="js/prime-ui-0.3-min.js"></script>
        <title><?php echo CHtml::encode($this->pageTitle); ?></title>
    </head>
Main content:

Code: Select all

                <div id="mystuff" style="margin-bottom:20px" title="Default">
                    The story begins as Don Vito Corleone, the head of a New York Mafia family, oversees his daughter's wedding. 
                    His beloved son Michael has just come home from the war, but does not intend to become part of his father's business. 
                    Through Michael's life the nature of the family business becomes clear. The business of the family is just like the head of the family, 
                    kind and benevolent to those who give respect, 
                    but given to ruthless violence whenever anything stands against the good of the family.
                </div>
<script type="text/javascript">
    $(function() {
        $('#mystuff').puipanel();
    });
</script>

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

07 Dec 2012, 10:21

I can't see jquery include? There is jquery-ui in head but not jquery.

Babas007
Posts: 251
Joined: 24 May 2011, 09:42

09 Dec 2012, 14:26

Indeed!!!

You're the man! Thanks!

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

09 Dec 2012, 14:37

Awesome!

Post Reply

Return to “PrimeUI”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 6 guests