Plugin Directory

Changeset 188377


Ignore:
Timestamp:
12/31/2009 09:25:50 AM (16 years ago)
Author:
wpdojoloader
Message:

*version 0.0.41

Location:
wpdojoloader/trunk
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • wpdojoloader/trunk/js/tinymce/editor_plugin.js

    r188102 r188377  
    8080                        //page
    8181                        m.add({title : 'wpdojoloader.insertpage', onclick : function() {
    82                             tinyMCE.execCommand('mceInsertContent', false, "<post id=\"1\" ></post>");
     82                            tinyMCE.execCommand('mceInsertContent', false, "<page id=\"1\" ></page>");
    8383                        }});
    8484                       
    8585                        //post
    8686                        m.add({title : 'wpdojoloader.insertpost', onclick : function() {
    87                             tinyMCE.execCommand('mceInsertContent', false, "<page id=\"1\" ></page>");
     87                            tinyMCE.execCommand('mceInsertContent', false, "<post id=\"1\" ></post>");
    8888                        }});
    8989                       
  • wpdojoloader/trunk/js/wpdojoloader.js

    r188102 r188377  
    175175        dojo.require("dijit.form.Button");
    176176        dojo.require("dijit.layout.BorderContainer");
    177        
     177        dojo.require("dijit.TitlePane");
     178
    178179        //Load the XML language
    179180        //dojo.require("dojox.highlight.languages.xml");
  • wpdojoloader/trunk/readme.txt

    r188102 r188377  
    22Contributors: lehmeier
    33Donate link: http://wpdojoloader.berlios.de/
    4 Tags: wordpress, dojo, datagrid, accordion, scrollpane, grid, table, nested, tab, widget, fisheye, xml, xsl
     4Tags: wordpress, dojo, datagrid, accordion, scrollpane, grid, table, nested, titlepane, tab, widget, fisheye, xml, xsl
    55Requires at least: 2.8.2
    66Tested up to: 2.8.5
    7 Stable tag: 0.0.4
     7Stable tag: 0.0.41
    88
    99== Description ==
     
    2121* scrollpane
    2222* accordionpane
    23 * accrodioncontainer
     23* accrodioncontainer
     24* titlepane
    2425
    2526To add a widget the plugin uses a simple xml structure so that you can create nested tabs or
     
    6667== Changelog ==
    6768
     69= 0.0.41 =
     70* fixed a bug with a foreach warning
     71* added a dojo titlepane widget
     72
    6873= 0.0.4 =
    6974* switched to dojo 1.4.0
  • wpdojoloader/trunk/wpdojoloader.php

    r188102 r188377  
    44Plugin URI: http://wpdojoloader.berlios.de/
    55Description: WpDojoloader allows you to include dojo widgets into wordpress
    6 Version: 0.0.4
     6Version: 0.0.41
    77Author: Dirk Lehmeier
    88Author URI: http://wpdojoloader.berlios.de/
     
    155155           
    156156            $obj = $xpathcontext->xpath_eval('//post/@id'); // get all post elements with attribute id
    157             $nodeset = $obj->nodeset;
    158            
    159             foreach ($nodeset as $node) {
    160                 $pstid = $node->value;
    161                 $pst = get_post($pstid);
    162                 if ($pst != null) {
    163                     $cnt = $this->executeParse($pst->post_content,"[dojocontent]","[/dojocontent]");
    164                     $node = $domdocument->create_element( 'postcontent' );
    165                     $attr = $domdocument->create_attribute  ( "id"  , "$pstid"  );
    166                     $cdata = $domdocument->create_cdata_section( $cnt );
    167                     $node->append_child( $attr );
    168                     $node->append_child( $cdata );
    169                     array_push($result, $node);
     157            if ($obj) {
     158                $nodeset = $obj->nodeset;
     159                if ($nodeset != null) {
     160                    foreach ($nodeset as $node) {
     161                        $pstid = $node->value;
     162                        $pst = get_post($pstid);
     163                        if ($pst != null) {
     164                            $cnt = $this->executeParse($pst->post_content,"[dojocontent]","[/dojocontent]");
     165                            $node = $domdocument->create_element( 'postcontent' );
     166                            $attr = $domdocument->create_attribute  ( "id"  , "$pstid"  );
     167                            $cdata = $domdocument->create_cdata_section( $cnt );
     168                            $node->append_child( $attr );
     169                            $node->append_child( $cdata );
     170                            array_push($result, $node);
     171                        }
     172                    }
    170173                }
    171174            }
     
    187190           
    188191            $obj = $xpathcontext->xpath_eval('//page/@id'); // get all post elements with attribute id
    189             $nodeset = $obj->nodeset;
    190            
    191             foreach ($nodeset as $node) {
    192                 $pstid = $node->value;
    193                 $pst = get_post($pstid);
    194                 if ($pst != null) {
    195                     $cnt = $this->executeParse($pst->post_content,"[dojocontent]","[/dojocontent]");
    196                    
    197                     $node = $domdocument->create_element( 'pagecontent' );
    198                     $attr = $domdocument->create_attribute  ( "id"  , "$pstid"  );
    199                     $cdata = $domdocument->create_cdata_section( $cnt );
    200                     $node->append_child( $attr );
    201                     $node->append_child( $cdata );
    202                     array_push($result, $node);
     192            if ($obj) {
     193                $nodeset = $obj->nodeset;
     194                if ($nodeset != null) {
     195                    foreach ($nodeset as $node) {
     196                        $pstid = $node->value;
     197                        $pst = get_post($pstid);
     198                        if ($pst != null) {
     199                            $cnt = $this->executeParse($pst->post_content,"[dojocontent]","[/dojocontent]");
     200                           
     201                            $node = $domdocument->create_element( 'pagecontent' );
     202                            $attr = $domdocument->create_attribute  ( "id"  , "$pstid"  );
     203                            $cdata = $domdocument->create_cdata_section( $cnt );
     204                            $node->append_child( $attr );
     205                            $node->append_child( $cdata );
     206                            array_push($result, $node);
     207                        }
     208                    }
    203209                }
    204210            }
     
    287293        function replaceGridStructures($xpathcontext) {
    288294            $obj = $xpathcontext->xpath_eval('//datagrid'); // get all post elements with attribute id
    289             $nodeset = $obj->nodeset;
    290            
    291             foreach ($nodeset as $node) {
    292                 $fields = $this->getFieldnames($node->get_attribute("structurename"));
    293                 $node->set_attribute("fieldnames",$fields);             
     295            if ($obj) {
     296                $nodeset = $obj->nodeset;
     297                if ($nodeset != null) {
     298                    foreach ($nodeset as $node) {
     299                        $fields = $this->getFieldnames($node->get_attribute("structurename"));
     300                        $node->set_attribute("fieldnames",$fields);             
     301                    }
     302                }
    294303            }   
    295304        }
     
    381390            $xd = $this->enrichXmlString($xd);
    382391           
    383             //echo "<!-- BEGIN XML".$xd." END XML -->"; //debug only
     392            echo "<!-- BEGIN XML".$xd." END XML -->"; //debug only
    384393           
    385394            $rslt = ($this->xml_translate($xd));
  • wpdojoloader/trunk/wpdojoloader.xsl

    r188102 r188377  
    221221   
    222222   
     223    <!-- a dojo titlepane -->
     224    <xsl:template match="titlepane">
     225        <div dojoType="dijit.TitlePane" >
     226           
     227            <!-- add all attributes from xml to html -->
     228            <xsl:call-template name="allattributes" >
     229                <xsl:with-param name="defaultstyle">width:100%;</xsl:with-param>
     230            </xsl:call-template>
     231       
     232            <xsl:value-of select="text()[1]" />
     233            <xsl:apply-templates/>
     234        </div>
     235    </xsl:template>
     236   
     237       
    223238    <!--
    224239         add all xml attributes as html attributes, if the style attribute does not exist
Note: See TracChangeset for help on using the changeset viewer.