Yii Framework Forum: [EXTENSION] CjsTree - Yii Framework Forum

Jump to content

  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

[EXTENSION] CjsTree Rate Topic: -----

#1 User is offline   shocky 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 26-February 09

Posted 06 June 2009 - 11:28 AM

Hi,

I've just developed a widget for the jsTree, a CTreeView enhancement.
Download the jstree component from their website (http://www.jstree.com) and extract it under protected/extensions/jsTree.
Then download attached CjsTree.php under the folder, just like install.jpg.

And read the documentation page.

Attached File(s)


0

#2 User is offline   ironwolf 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 08-August 09

Posted 18 September 2009 - 02:10 PM

Plz, could you put it on the extensions page?

[grump]
The attachments and links in the forum are a bit broken... Is there any way to fix them?
[/grump]
0

#3 User is offline   shocky 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 26-February 09

Posted 20 September 2009 - 08:47 PM

View Postironwolf, on 18 September 2009 - 02:10 PM, said:

Plz, could you put it on the extensions page?

[grump]
The attachments and links in the forum are a bit broken... Is there any way to fix them?
[/grump]

ironwolf,

I've uploaded it as a jsTree on the extension page, but there are some errors in documentation.
Though I tried several ways to fix it using the Markdown syntax, I cannot figure it out how it can displays the HTML tags as itself.
If somebody let me know the correct way to display the HTML tags in the documentation, I will fix it.
0

#4 User is offline   ironwolf 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 08-August 09

Posted 22 September 2009 - 12:49 PM

thx man
0

#5 User is offline   Geert 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 10-August 09

Posted 23 September 2009 - 12:15 PM

When I download the extension from the extension page I get the error that the archive is corrupt. (I tried it using tar/gzip on ubuntu and WinRAR on windows.

Does anyone have the same problem?
0

#6 User is offline   Raoul 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 642
  • Joined: 29-November 08
  • Location:Paris, France

Posted 23 September 2009 - 01:18 PM

works fine for me (winRar on window$ ;) )
B)
0

#7 User is offline   Geert 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 10-August 09

Posted 24 September 2009 - 12:45 AM

Thanks Raoul, I tried it on a third computer today and it seems to work now.. :)
0

#8 User is offline   Darkfly 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 24
  • Joined: 04-September 09

Posted 25 September 2009 - 05:46 PM

I think this problem come from your internet broswer...

I have a error of corrupted file with any extensions i have downloaded with IE 7. I have to download it with Firefox and is work after that.
0

#9 User is offline   Backslider 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 363
  • Joined: 23-July 09

Posted 09 October 2009 - 10:44 PM

Could you please bundle a working example with this, since trying to follow your truncated directions is impossible.

PS. The download file is weird. I had to extract it, then rename the extracted file which was without an extension to file.tgz and extract it again.
We were all once expert at....... nothing.

yii-language-behavior

My Blog
0

#10 User is offline   shocky 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 26-February 09

Posted 10 October 2009 - 12:57 AM

View PostBackslider, on 09 October 2009 - 10:44 PM, said:

Could you please bundle a working example with this, since trying to follow your truncated directions is impossible.

PS. The download file is weird. I had to extract it, then rename the extracted file which was without an extension to file.tgz and extract it again.

Backslider,

To make it simple, just add an actionTree1() to your ``working`` controller and add a views/your-controller-view-folder/tree1.php file, which is explained in the documentation ``Case 1: using HTML``.

If you want to display a hierarchical database table, you need the nestedset extension.
Read the nestedset documentation carefully, and set up your database then follow my documentation ``Case 2: using database table.``

Good luck.

PS: I've just uploaded a new tar file.
0

#11 User is offline   Backslider 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 363
  • Joined: 23-July 09

Posted 10 October 2009 - 05:19 PM

Thanks Shocky. I got it going ok myself (with nested set), however for newbies its gonna be difficult.
We were all once expert at....... nothing.

yii-language-behavior

My Blog
0

#12 User is offline   jerry2801 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 504
  • Joined: 18-November 09

Posted 08 December 2009 - 01:00 AM

the jsTree extendsion can support jsTree v.0.9.9a?
0

#13 User is offline   seb 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 240
  • Joined: 29-June 09

Posted 11 December 2009 - 03:36 AM

View Postjerry2801, on 08 December 2009 - 01:00 AM, said:

the jsTree extendsion can support jsTree v.0.9.9a?


To use jsTree v.0.9.9a you need to modify CjsTree::init() method, this is my version:
    public function init()
    {
        if(isset($this->htmlOptions['id']))
            $id=$this->htmlOptions['id'];
        else
            $id=$this->htmlOptions['id']=$this->getId();
        if($this->url!==null)
            $this->url=CHtml::normalizeUrl($this->url);

        $dir = dirname(__FILE__).DIRECTORY_SEPARATOR.'source';
        $this->baseUrl = Yii::app()->getAssetManager()->publish($dir);

        $cs=Yii::app()->getClientScript();
        //$cs->registerScriptFile($this->baseUrl.'/jquery.tree.js');
        $cs->registerScriptFile($this->baseUrl.'/jquery.tree.min.js');

        // jstree should make this automatically (see line 211),  
        // but this does not work if script is loaded
        // dynamically with renderPartial into jQuery/UI dialog
        if (!isset($this->options['ui'])) $this->options['ui'] = array();
        if (!isset($this->options['ui']['theme_name'])) $this->options['ui']['theme_name'] = 'default';
        if (!isset($this->options['ui']['theme_path'])) $this->options['ui']['theme_path'] = 
             $this->baseUrl.'/themes/'.$this->options['ui']['theme_name'].'/style.css';

        $options=$this->getClientOptions();
        $options=$options===array()?'{}' : CJavaScript::encode($options);
        $cs->registerScript('Yii.CJsTree#'.$id,"$(function () { $(\"#{$id}\").tree($options); });");
        if($this->cssFile !== null && $this->cssFile !== false)
            $cs->registerCssFile($this->cssFile);
    }


0

#14 User is offline   rebus 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 31
  • Joined: 07-December 09
  • Location:Ancona

Posted 29 January 2010 - 05:50 AM

Seb,
i am getting the following error

include(CJavascript.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory

can anybody help me with this....
0

#15 User is offline   seb 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 240
  • Joined: 29-June 09

Posted 31 January 2010 - 06:13 AM

View Postrebus, on 29 January 2010 - 05:50 AM, said:

Seb,
i am getting the following error

include(CJavascript.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory

can anybody help me with this....


Try to change "CJavascript::encode" to "CJavaScript::encode"
0

#16 User is offline   rebus 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 31
  • Joined: 07-December 09
  • Location:Ancona

Posted 03 February 2010 - 05:37 AM

View Postseb, on 31 January 2010 - 06:13 AM, said:

Try to change "CJavascript::encode" to "CJavaScript::encode"


Thanks, but Theme Images not showing :mellow:
0

#17 User is offline   tydeas_dr 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 158
  • Joined: 16-April 10
  • Location:Greece

Posted 03 May 2010 - 03:42 AM

To get this file i used wget to downloaded it and worked.
Follow me on twitter @dmtrsslvdr
Check my *new* blog @ tumblr
0

#18 User is offline   tydeas_dr 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 158
  • Joined: 16-April 10
  • Location:Greece

Posted 03 May 2010 - 11:40 AM

Set it up and the big trouble began. The main problem is that when i try to use variable TREE_OBJ in the callbacks ( either in alert or try to use it's method ) nothing happens. After debugging with firebug i see that the TREE_OBJ has value false instead of object params.
Finally, is this extension left to it's faith? Will there be any more contribute to it?
Friendly,
dmtrs
Follow me on twitter @dmtrsslvdr
Check my *new* blog @ tumblr
0

#19 User is offline   saiprem 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 26-April 10

Posted 10 May 2010 - 07:27 AM

View Posttydeas_dr, on 03 May 2010 - 11:40 AM, said:

Set it up and the big trouble began. The main problem is that when i try to use variable TREE_OBJ in the callbacks ( either in alert or try to use it's method ) nothing happens. After debugging with firebug i see that the TREE_OBJ has value false instead of object params.
Finally, is this extension left to it's faith? Will there be any more contribute to it?
Friendly,
dmtrs


Hi All,

I am newbie, please help me, anchor tag is not clickable[not taking me to the URL]

please find below the code

<ul>
	<li class="open">
		<a href="subgroup_9/" class="">Sub Group3 . 1</a>
			<ul>
				<li class="leaf"><a href="test_10/index.php" class="clicked">Test10</a></li>
				<li class="leaf"><a href="test_11/index.php" class="">Test11</a></li>
				<li class="leaf"><a href="test_12/index.php" class="">Test12</a></li>
				<li class="last leaf"><a href="test_13/index.php" class="">Test13</a></li>
			</ul>
	</li>
	<li class="last closed">
		<a href="/subgroup_10/">Sub Group3 . 2</a><br/>
		<ul>
			<li class="leaf"><a href="test_14/index.php">Test14</a></li>
			<li class="last leaf"><a href="test_15/index.php">Test15</a></li>
		</ul>
	</li>
</ul>


Even if anchor tag has an url like "test_10/index.php", onClicking on that anchor text it is not going to the specified URL, please tell me how can I make this work
Thanks & Regards
Sai Prem
creativeblows
0

#20 User is offline   talles 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 42
  • Joined: 08-May 11

Posted 31 May 2011 - 05:58 PM

it didnt worked with me =/ when i try to use the code example of the program it shows {"type":"json","async":true,"opts":{"method":"GET","async":true,"url":"http:\/\/www.jstree.com\/demos\/async_json_data.json"}}
0

Share this topic:


  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users