Changeset 188377
- Timestamp:
- 12/31/2009 09:25:50 AM (16 years ago)
- Location:
- wpdojoloader/trunk
- Files:
-
- 1 added
- 5 edited
-
ajax-save.php (added)
-
js/tinymce/editor_plugin.js (modified) (1 diff)
-
js/wpdojoloader.js (modified) (1 diff)
-
readme.txt (modified) (3 diffs)
-
wpdojoloader.php (modified) (5 diffs)
-
wpdojoloader.xsl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wpdojoloader/trunk/js/tinymce/editor_plugin.js
r188102 r188377 80 80 //page 81 81 m.add({title : 'wpdojoloader.insertpage', onclick : function() { 82 tinyMCE.execCommand('mceInsertContent', false, "<p ost id=\"1\" ></post>");82 tinyMCE.execCommand('mceInsertContent', false, "<page id=\"1\" ></page>"); 83 83 }}); 84 84 85 85 //post 86 86 m.add({title : 'wpdojoloader.insertpost', onclick : function() { 87 tinyMCE.execCommand('mceInsertContent', false, "<p age id=\"1\" ></page>");87 tinyMCE.execCommand('mceInsertContent', false, "<post id=\"1\" ></post>"); 88 88 }}); 89 89 -
wpdojoloader/trunk/js/wpdojoloader.js
r188102 r188377 175 175 dojo.require("dijit.form.Button"); 176 176 dojo.require("dijit.layout.BorderContainer"); 177 177 dojo.require("dijit.TitlePane"); 178 178 179 //Load the XML language 179 180 //dojo.require("dojox.highlight.languages.xml"); -
wpdojoloader/trunk/readme.txt
r188102 r188377 2 2 Contributors: lehmeier 3 3 Donate link: http://wpdojoloader.berlios.de/ 4 Tags: wordpress, dojo, datagrid, accordion, scrollpane, grid, table, nested, t ab, widget, fisheye, xml, xsl4 Tags: wordpress, dojo, datagrid, accordion, scrollpane, grid, table, nested, titlepane, tab, widget, fisheye, xml, xsl 5 5 Requires at least: 2.8.2 6 6 Tested up to: 2.8.5 7 Stable tag: 0.0.4 7 Stable tag: 0.0.41 8 8 9 9 == Description == … … 21 21 * scrollpane 22 22 * accordionpane 23 * accrodioncontainer 23 * accrodioncontainer 24 * titlepane 24 25 25 26 To add a widget the plugin uses a simple xml structure so that you can create nested tabs or … … 66 67 == Changelog == 67 68 69 = 0.0.41 = 70 * fixed a bug with a foreach warning 71 * added a dojo titlepane widget 72 68 73 = 0.0.4 = 69 74 * switched to dojo 1.4.0 -
wpdojoloader/trunk/wpdojoloader.php
r188102 r188377 4 4 Plugin URI: http://wpdojoloader.berlios.de/ 5 5 Description: WpDojoloader allows you to include dojo widgets into wordpress 6 Version: 0.0.4 6 Version: 0.0.41 7 7 Author: Dirk Lehmeier 8 8 Author URI: http://wpdojoloader.berlios.de/ … … 155 155 156 156 $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 } 170 173 } 171 174 } … … 187 190 188 191 $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 } 203 209 } 204 210 } … … 287 293 function replaceGridStructures($xpathcontext) { 288 294 $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 } 294 303 } 295 304 } … … 381 390 $xd = $this->enrichXmlString($xd); 382 391 383 //echo "<!-- BEGIN XML".$xd." END XML -->"; //debug only392 echo "<!-- BEGIN XML".$xd." END XML -->"; //debug only 384 393 385 394 $rslt = ($this->xml_translate($xd)); -
wpdojoloader/trunk/wpdojoloader.xsl
r188102 r188377 221 221 222 222 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 223 238 <!-- 224 239 add all xml attributes as html attributes, if the style attribute does not exist
Note: See TracChangeset
for help on using the changeset viewer.